|
1 | 1 | package org.fox.ttrss.types; |
2 | 2 |
|
3 | | -import android.os.Parcel; |
4 | | -import android.os.Parcelable; |
5 | | - |
6 | 3 | import org.jsoup.Jsoup; |
7 | 4 | import org.jsoup.nodes.Document; |
8 | 5 | import org.jsoup.nodes.Element; |
|
16 | 13 | import java.util.regex.Pattern; |
17 | 14 |
|
18 | 15 | // TODO: serialize Labels |
19 | | -public class Article implements Parcelable { |
| 16 | +public class Article { |
20 | 17 | public static final int TYPE_AMR_FOOTER = -2; |
21 | 18 |
|
22 | 19 | public static final int FLAVOR_KIND_ALBUM = 1; |
@@ -73,10 +70,6 @@ public class Article implements Parcelable { |
73 | 70 | transient public String youtubeVid; |
74 | 71 | transient public List<Element> mediaList = new ArrayList<>(); |
75 | 72 |
|
76 | | - public Article(Parcel in) { |
77 | | - readFromParcel(in); |
78 | | - } |
79 | | - |
80 | 73 | public Article() { |
81 | 74 |
|
82 | 75 | } |
@@ -237,81 +230,6 @@ public Article(Article clone) { |
237 | 230 | mediaList = new ArrayList<>(clone.mediaList); |
238 | 231 | } |
239 | 232 |
|
240 | | - @Override |
241 | | - public int describeContents() { |
242 | | - return 0; |
243 | | - } |
244 | | - |
245 | | - @Override |
246 | | - public void writeToParcel(Parcel out, int flags) { |
247 | | - out.writeInt(id); |
248 | | - out.writeInt(unread ? 1 : 0); |
249 | | - out.writeInt(marked ? 1 : 0); |
250 | | - out.writeInt(published ? 1 : 0); |
251 | | - out.writeInt(score); |
252 | | - out.writeInt(updated); |
253 | | - out.writeInt(is_updated ? 1 : 0); |
254 | | - out.writeString(title); |
255 | | - out.writeString(link); |
256 | | - out.writeInt(feed_id); |
257 | | - out.writeStringList(tags); |
258 | | - out.writeString(content); |
259 | | - out.writeString(excerpt); |
260 | | - out.writeList(attachments); |
261 | | - out.writeString(feed_title); |
262 | | - out.writeInt(comments_count); |
263 | | - out.writeString(comments_link); |
264 | | - out.writeInt(always_display_attachments ? 1 : 0); |
265 | | - out.writeString(author); |
266 | | - out.writeString(note); |
267 | | - out.writeInt(selected ? 1 : 0); |
268 | | - out.writeString(site_url); |
269 | | - } |
270 | | - |
271 | | - public void readFromParcel(Parcel in) { |
272 | | - id = in.readInt(); |
273 | | - unread = in.readInt() == 1; |
274 | | - marked = in.readInt() == 1; |
275 | | - published = in.readInt() == 1; |
276 | | - score = in.readInt(); |
277 | | - updated = in.readInt(); |
278 | | - is_updated = in.readInt() == 1; |
279 | | - title = in.readString(); |
280 | | - link = in.readString(); |
281 | | - feed_id = in.readInt(); |
282 | | - |
283 | | - if (tags == null) tags = new ArrayList<>(); |
284 | | - in.readStringList(tags); |
285 | | - |
286 | | - content = in.readString(); |
287 | | - excerpt = in.readString(); |
288 | | - |
289 | | - attachments = new ArrayList<>(); |
290 | | - in.readList(attachments, Attachment.class.getClassLoader()); |
291 | | - |
292 | | - feed_title = in.readString(); |
293 | | - |
294 | | - comments_count = in.readInt(); |
295 | | - comments_link = in.readString(); |
296 | | - always_display_attachments = in.readInt() == 1; |
297 | | - author = in.readString(); |
298 | | - note = in.readString(); |
299 | | - selected = in.readInt() == 1; |
300 | | - site_url = in.readString(); |
301 | | - } |
302 | | - |
303 | | - @SuppressWarnings("rawtypes") |
304 | | - public static final Parcelable.Creator CREATOR = |
305 | | - new Parcelable.Creator() { |
306 | | - public Article createFromParcel(Parcel in) { |
307 | | - return new Article(in); |
308 | | - } |
309 | | - |
310 | | - public Article[] newArray(int size) { |
311 | | - return new Article[size]; |
312 | | - } |
313 | | - }; |
314 | | - |
315 | 233 | /** |
316 | 234 | * set fields which might be missing during JSON deserialization to sane values |
317 | 235 | */ |
|
0 commit comments