aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-09-09 14:51:30 -0700
committerScott Jackson <daneren2005@gmail.com>2014-09-09 14:51:30 -0700
commit2ec032eb5c208d75ff19952288f327f8e5378caf (patch)
tree08a751c47b55c590ac17b41a5760010fc7417ac9 /src/github
parent6528e2f0e374710044cd04dee55754cccc39a5be (diff)
downloaddsub-2ec032eb5c208d75ff19952288f327f8e5378caf.tar.gz
dsub-2ec032eb5c208d75ff19952288f327f8e5378caf.tar.bz2
dsub-2ec032eb5c208d75ff19952288f327f8e5378caf.zip
Keep recents list from growing infinitely
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java
index b1320f3f..bbdc4de6 100644
--- a/src/github/daneren2005/dsub/fragments/MainFragment.java
+++ b/src/github/daneren2005/dsub/fragments/MainFragment.java
@@ -493,6 +493,11 @@ public class MainFragment extends SubsonicFragment {
count++;
}
}
+
+ // Keep recents list from growing infinitely
+ while(recents.size() > 40) {
+ recents.remove(0);
+ }
FileUtil.serialize(context, recents, recentAddedFile);
if(firstRun) {