aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-12-09 15:13:09 -0800
committerdaneren2005 <daneren2005@gmail.com>2013-12-09 15:13:09 -0800
commit8ee3710b1d9e4a1e7a4d56bfd74d9d6a110c92d7 (patch)
tree8b47ef2ceae2fe2e7f521e251e1ca6c8b0bf1aa6 /src
parenta9aff50ae544dd249ce700448beae18624c3ca74 (diff)
downloaddsub-8ee3710b1d9e4a1e7a4d56bfd74d9d6a110c92d7.tar.gz
dsub-8ee3710b1d9e4a1e7a4d56bfd74d9d6a110c92d7.tar.bz2
dsub-8ee3710b1d9e4a1e7a4d56bfd74d9d6a110c92d7.zip
Added starred/most recent sync files
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/SyncUtil.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/util/SyncUtil.java b/src/github/daneren2005/dsub/util/SyncUtil.java
index 463baf9e..698d4e78 100644
--- a/src/github/daneren2005/dsub/util/SyncUtil.java
+++ b/src/github/daneren2005/dsub/util/SyncUtil.java
@@ -101,6 +101,30 @@ public final class SyncUtil {
public static String getPodcastSyncFile(Context context, int instance) {
return "sync-podcast-" + (Util.getRestUrl(context, null, instance)).hashCode() + ".ser";
}
+
+ // Starred
+ public static List<String> getSyncedStarred(Context context, int instance) {
+ ArrayList<String> list = FileUtil.deserialize(context, getStarredSyncFile(context, instance), ArrayList.class);
+ if(list == null) {
+ list = new ArrayList<String>();
+ }
+ return list;
+ }
+ public static String getStarredSyncFile(Context context, int instance) {
+ return "sync-starred-" + (Util.getRestUrl(context, null, instance)).hashCode() + ".ser";
+ }
+
+ // Most Recently Added
+ public static List<String> getSyncedMostRecent(Context context, int instance) {
+ ArrayList<String> list = FileUtil.deserialize(context, getMostRecentSyncFile(context, instance), ArrayList.class);
+ if(list == null) {
+ list = new ArrayList<String>();
+ }
+ return list;
+ }
+ public static String getMostRecentSyncFile(Context context, int instance) {
+ return "sync-most_recent-" + (Util.getRestUrl(context, null, instance)).hashCode() + ".ser";
+ }
public static class SyncSet implements Serializable {
public String id;