mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Android widget parse and add new feed fields to db
This commit is contained in:
parent
1c9bcab3aa
commit
53a8be2976
3 changed files with 22 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.newsblur"
|
||||
android:versionCode="163"
|
||||
android:versionName="9.0.1" >
|
||||
android:versionName="9.0.2" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="21"
|
||||
|
|
|
@ -35,6 +35,9 @@ public class DatabaseConstants {
|
|||
public static final String FEED_LINK = "link";
|
||||
public static final String FEED_ADDRESS = "address";
|
||||
public static final String FEED_SUBSCRIBERS = "subscribers";
|
||||
public static final String FEED_OPENS = "opens";
|
||||
public static final String FEED_LAST_STORY_DATE = "last_story_date";
|
||||
public static final String FEED_AVERAGE_STORIES_PER_MONTH = "average_stories_per_month";
|
||||
public static final String FEED_UPDATED_SECONDS = "updated_seconds";
|
||||
public static final String FEED_FAVICON_FADE = "favicon_fade";
|
||||
public static final String FEED_FAVICON_COLOR = "favicon_color";
|
||||
|
@ -183,6 +186,9 @@ public class DatabaseConstants {
|
|||
FEED_LINK + TEXT + ", " +
|
||||
FEED_SUBSCRIBERS + TEXT + ", " +
|
||||
FEED_TITLE + TEXT + ", " +
|
||||
FEED_OPENS + INTEGER + ", " +
|
||||
FEED_AVERAGE_STORIES_PER_MONTH + INTEGER + ", " +
|
||||
FEED_LAST_STORY_DATE + TEXT + ", " +
|
||||
FEED_UPDATED_SECONDS + INTEGER + ", " +
|
||||
FEED_NOTIFICATION_TYPES + TEXT + ", " +
|
||||
FEED_NOTIFICATION_FILTER + TEXT + ", " +
|
||||
|
|
|
@ -54,6 +54,15 @@ public class Feed implements Comparable<Feed>, Serializable {
|
|||
@SerializedName("num_subscribers")
|
||||
public String subscribers;
|
||||
|
||||
@SerializedName("feed_opens")
|
||||
public int feedOpens;
|
||||
|
||||
@SerializedName("last_story_date")
|
||||
public String lastStoryDate;
|
||||
|
||||
@SerializedName("average_stories_per_month")
|
||||
public int storiesPerMonth;
|
||||
|
||||
@SerializedName("feed_title")
|
||||
public String title;
|
||||
|
||||
|
@ -85,6 +94,9 @@ public class Feed implements Comparable<Feed>, Serializable {
|
|||
values.put(DatabaseConstants.FEED_FAVICON_URL, faviconUrl);
|
||||
values.put(DatabaseConstants.FEED_LINK, feedLink);
|
||||
values.put(DatabaseConstants.FEED_SUBSCRIBERS, subscribers);
|
||||
values.put(DatabaseConstants.FEED_OPENS, feedOpens);
|
||||
values.put(DatabaseConstants.FEED_LAST_STORY_DATE, lastStoryDate);
|
||||
values.put(DatabaseConstants.FEED_AVERAGE_STORIES_PER_MONTH, storiesPerMonth);
|
||||
values.put(DatabaseConstants.FEED_TITLE, title);
|
||||
values.put(DatabaseConstants.FEED_UPDATED_SECONDS, lastUpdated);
|
||||
values.put(DatabaseConstants.FEED_NOTIFICATION_TYPES, DatabaseConstants.flattenStringList(notificationTypes));
|
||||
|
@ -113,6 +125,9 @@ public class Feed implements Comparable<Feed>, Serializable {
|
|||
feed.neutralCount = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.FEED_NEUTRAL_COUNT));
|
||||
feed.positiveCount = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.FEED_POSITIVE_COUNT));
|
||||
feed.subscribers = cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_SUBSCRIBERS));
|
||||
feed.feedOpens = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.FEED_OPENS));
|
||||
feed.storiesPerMonth = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.FEED_AVERAGE_STORIES_PER_MONTH));
|
||||
feed.lastStoryDate = cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_LAST_STORY_DATE));
|
||||
feed.title = cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_TITLE));
|
||||
feed.lastUpdated = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.FEED_UPDATED_SECONDS));
|
||||
feed.notificationTypes = DatabaseConstants.unflattenStringList(cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_NOTIFICATION_TYPES)));
|
||||
|
|
Loading…
Add table
Reference in a new issue