summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Hennen <tom.hennen@gmail.com>2016-01-25 17:21:13 -0500
committerTom Hennen <tom.hennen@gmail.com>2016-01-25 17:21:13 -0500
commit7dfe4d5ed34ebc308b123138e582436a22bc95cf (patch)
tree0db635f0d4727aee29f4c0cc9e1e3664f93e4fde /core
parent193fc7adee2c1b91d9ccdf6c6848b3b156cd2540 (diff)
downloadAntennaPod-7dfe4d5ed34ebc308b123138e582436a22bc95cf.zip
Global Refresh -> Keep Updated
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java16
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java4
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java14
-rw-r--r--core/src/main/res/values/strings.xml2
5 files changed, 19 insertions, 19 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java
index 30e14dd5e..faf23a37a 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedPreferences.java
@@ -18,7 +18,7 @@ public class FeedPreferences {
private FeedFilter filter;
private long feedID;
private boolean autoDownload;
- private boolean globalRefresh;
+ private boolean keepUpdated;
public enum AutoDeleteAction {
GLOBAL,
@@ -33,10 +33,10 @@ public class FeedPreferences {
this(feedID, autoDownload, true, auto_delete_action, username, password, new FeedFilter());
}
- public FeedPreferences(long feedID, boolean autoDownload, boolean globalRefresh, AutoDeleteAction auto_delete_action, String username, String password, @NonNull FeedFilter filter) {
+ public FeedPreferences(long feedID, boolean autoDownload, boolean keepUpdated, AutoDeleteAction auto_delete_action, String username, String password, @NonNull FeedFilter filter) {
this.feedID = feedID;
this.autoDownload = autoDownload;
- this.globalRefresh = globalRefresh;
+ this.keepUpdated = keepUpdated;
this.auto_delete_action = auto_delete_action;
this.username = username;
this.password = password;
@@ -46,7 +46,7 @@ public class FeedPreferences {
public static FeedPreferences fromCursor(Cursor cursor) {
int indexId = cursor.getColumnIndex(PodDBAdapter.KEY_ID);
int indexAutoDownload = cursor.getColumnIndex(PodDBAdapter.KEY_AUTO_DOWNLOAD);
- int indexAutoRefresh = cursor.getColumnIndex(PodDBAdapter.KEY_GLOBAL_REFRESH);
+ int indexAutoRefresh = cursor.getColumnIndex(PodDBAdapter.KEY_KEEP_UPDATED);
int indexAutoDeleteAction = cursor.getColumnIndex(PodDBAdapter.KEY_AUTO_DELETE_ACTION);
int indexUsername = cursor.getColumnIndex(PodDBAdapter.KEY_USERNAME);
int indexPassword = cursor.getColumnIndex(PodDBAdapter.KEY_PASSWORD);
@@ -80,12 +80,12 @@ public class FeedPreferences {
* @return true if this feed should be refreshed when everything else is being refreshed
* if false the feed should only be refreshed if requested directly.
*/
- public boolean getGlobalRefresh() {
- return globalRefresh;
+ public boolean getKeepUpdated() {
+ return keepUpdated;
}
- public void setGlobalRefresh(boolean globalRefresh) {
- this.globalRefresh = globalRefresh;
+ public void setKeepUpdated(boolean keepUpdated) {
+ this.keepUpdated = keepUpdated;
}
/**
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
index d29eec02c..0563f878f 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
@@ -371,7 +371,7 @@ public final class DBReader {
/**
* Loads a list of FeedItems that are considered new.
- * Excludes items from feeds that do not have global refresh enabled.
+ * Excludes items from feeds that do not have keep updated enabled.
* @return A list of FeedItems that are considered new.
*/
public static List<FeedItem> getNewItemsList() {
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
index b69fa1eef..efc60bfc2 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java
@@ -196,9 +196,9 @@ public final class DBTasks {
for (Feed feed : feedList) {
FeedPreferences prefs = feed.getPreferences();
- // feeds with !getGlobalRefresh can only be refreshed
+ // feeds with !getKeepUpdated can only be refreshed
// directly from the FeedActivity
- if (prefs.getGlobalRefresh()) {
+ if (prefs.getKeepUpdated()) {
try {
refreshFeed(context, feed);
} catch (DownloadRequestException e) {
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
index 4dcb7e096..85ff8fc8c 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
@@ -92,7 +92,7 @@ public class PodDBAdapter {
public static final String KEY_CHAPTER_TYPE = "type";
public static final String KEY_PLAYBACK_COMPLETION_DATE = "playback_completion_date";
public static final String KEY_AUTO_DOWNLOAD = "auto_download";
- public static final String KEY_GLOBAL_REFRESH = "global_refresh";
+ public static final String KEY_KEEP_UPDATED = "keep_updated";
public static final String KEY_AUTO_DELETE_ACTION = "auto_delete_action";
public static final String KEY_PLAYED_DURATION = "played_duration";
public static final String KEY_USERNAME = "username";
@@ -133,7 +133,7 @@ public class PodDBAdapter {
+ KEY_PASSWORD + " TEXT,"
+ KEY_INCLUDE_FILTER + " TEXT DEFAULT '',"
+ KEY_EXCLUDE_FILTER + " TEXT DEFAULT '',"
- + KEY_GLOBAL_REFRESH + " INTEGER DEFAULT 1,"
+ + KEY_KEEP_UPDATED + " INTEGER DEFAULT 1,"
+ KEY_IS_PAGED + " INTEGER DEFAULT 0,"
+ KEY_NEXT_PAGE_LINK + " TEXT,"
+ KEY_HIDE + " TEXT,"
@@ -236,7 +236,7 @@ public class PodDBAdapter {
TABLE_NAME_FEEDS + "." + KEY_TYPE,
TABLE_NAME_FEEDS + "." + KEY_FEED_IDENTIFIER,
TABLE_NAME_FEEDS + "." + KEY_AUTO_DOWNLOAD,
- TABLE_NAME_FEEDS + "." + KEY_GLOBAL_REFRESH,
+ TABLE_NAME_FEEDS + "." + KEY_KEEP_UPDATED,
TABLE_NAME_FEEDS + "." + KEY_FLATTR_STATUS,
TABLE_NAME_FEEDS + "." + KEY_IS_PAGED,
TABLE_NAME_FEEDS + "." + KEY_NEXT_PAGE_LINK,
@@ -401,7 +401,7 @@ public class PodDBAdapter {
}
ContentValues values = new ContentValues();
values.put(KEY_AUTO_DOWNLOAD, prefs.getAutoDownload());
- values.put(KEY_GLOBAL_REFRESH, prefs.getGlobalRefresh());
+ values.put(KEY_KEEP_UPDATED, prefs.getKeepUpdated());
values.put(KEY_AUTO_DELETE_ACTION,prefs.getAutoDeleteAction().ordinal());
values.put(KEY_USERNAME, prefs.getUsername());
values.put(KEY_PASSWORD, prefs.getPassword());
@@ -1147,7 +1147,7 @@ public class PodDBAdapter {
/**
* Returns a cursor which contains all feed items that are considered new.
- * Excludes those feeds that do not have 'global_refresh' enabled.
+ * Excludes those feeds that do not have 'Keep Updated' enabled.
* The returned cursor uses the FEEDITEM_SEL_FI_SMALL selection.
*/
public final Cursor getNewItemsCursor() {
@@ -1156,7 +1156,7 @@ public class PodDBAdapter {
TABLE_NAME_FEED_ITEMS,
TABLE_NAME_FEEDS,
TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" + TABLE_NAME_FEEDS + "." + KEY_ID,
- TABLE_NAME_FEED_ITEMS + "." + KEY_READ + "=" + FeedItem.NEW + " AND " + TABLE_NAME_FEEDS + "." + KEY_GLOBAL_REFRESH + " > 0",
+ TABLE_NAME_FEED_ITEMS + "." + KEY_READ + "=" + FeedItem.NEW + " AND " + TABLE_NAME_FEEDS + "." + KEY_KEEP_UPDATED + " > 0",
KEY_PUBDATE + " DESC"
};
final String query = String.format("SELECT %s FROM %s INNER JOIN %s ON %s WHERE %s ORDER BY %s", args);
@@ -1802,7 +1802,7 @@ public class PodDBAdapter {
// and now auto refresh
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
- + " ADD COLUMN " + PodDBAdapter.KEY_GLOBAL_REFRESH + " INTEGER DEFAULT 1");
+ + " ADD COLUMN " + PodDBAdapter.KEY_KEEP_UPDATED + " INTEGER DEFAULT 1");
}
EventBus.getDefault().post(ProgressEvent.end());
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 3adcb6e00..04b3feef6 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -536,7 +536,7 @@
<string name="episode_filters_include">Include</string>
<string name="episode_filters_exclude">Exclude</string>
<string name="episode_filters_hint">Single words \n\"Multiple Words\"</string>
- <string name="global_refresh">Global Refresh</string>
+ <string name="keep_updated">Keep Updated</string>
<!-- Progress information -->
<string name="progress_upgrading_database">Upgrading the database</string>