summaryrefslogtreecommitdiff
path: root/src/org/fox/ttrss/Feed.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/fox/ttrss/Feed.java')
-rw-r--r--src/org/fox/ttrss/Feed.java31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/org/fox/ttrss/Feed.java b/src/org/fox/ttrss/Feed.java
index 1f18521b..feed1767 100644
--- a/src/org/fox/ttrss/Feed.java
+++ b/src/org/fox/ttrss/Feed.java
@@ -1,6 +1,9 @@
package org.fox.ttrss;
-public class Feed implements Comparable<Feed> {
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class Feed implements Comparable<Feed>, Parcelable {
String feed_url;
String title;
int id;
@@ -16,4 +19,30 @@ public class Feed implements Comparable<Feed> {
else
return this.title.compareTo(feed.title);
}
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeString(feed_url);
+ out.writeString(title);
+ out.writeInt(id);
+ out.writeInt(unread);
+ out.writeInt(has_icon ? 1 : 0);
+ out.writeInt(cat_id);
+ out.writeInt(last_updated);
+ }
+
+ public void readFromParcel(Parcel in) {
+ feed_url = in.readString();
+ title = in.readString();
+ id = in.readInt();
+ unread = in.readInt();
+ has_icon = in.readInt() == 1;
+ cat_id = in.readInt();
+ last_updated = in.readInt();
+ }
} \ No newline at end of file