diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-09-09 14:53:26 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-09-09 14:53:26 -0700 |
commit | 37ef7b929395ade8c078f9ecbe4ca193ee30e079 (patch) | |
tree | 4187c2685d64f5ff6e4c3233bae70ec6601f5e54 | |
parent | 2ec032eb5c208d75ff19952288f327f8e5378caf (diff) | |
download | dsub-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.java | 4 |
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
|