aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-09-09 14:53:26 -0700
committerScott Jackson <daneren2005@gmail.com>2014-09-09 14:53:26 -0700
commit37ef7b929395ade8c078f9ecbe4ca193ee30e079 (patch)
tree4187c2685d64f5ff6e4c3233bae70ec6601f5e54
parent2ec032eb5c208d75ff19952288f327f8e5378caf (diff)
downloaddsub-37ef7b929395ade8c078f9ecbe4ca193ee30e079.tar.gz
dsub-37ef7b929395ade8c078f9ecbe4ca193ee30e079.tar.bz2
dsub-37ef7b929395ade8c078f9ecbe4ca193ee30e079.zip
Keep syncedList from growing infinitely
-rw-r--r--src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java
index 6dfbbbe4..a0727201 100644
--- a/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java
+++ b/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java
@@ -83,6 +83,10 @@ public class MostRecentSyncAdapter extends SubsonicSyncAdapter {
}
if(updated.size() > 0) {
+ while(syncedList.size() > 40) {
+ syncedList.remove(0);
+ }
+
FileUtil.serialize(context, syncedList, SyncUtil.getMostRecentSyncFile(context, instance));
// If there is a new album on the active server, chances are artists need to be refreshed