diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-10-14 15:27:16 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-10-14 15:27:16 -0700 |
commit | ef4588a6950c0b64c5ceb3fe46782f4785b1cd94 (patch) | |
tree | 50bb764e4eefcefb34e2505ac4a4e7c4b50bd82b /src/github/daneren2005 | |
parent | 08a434690ee25320a256242ee9c9f34926ece4f9 (diff) | |
download | dsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.tar.gz dsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.tar.bz2 dsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.zip |
Fix all servers sharing a recently added count
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/MainFragment.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java index bbdc4de6..403bad03 100644 --- a/src/github/daneren2005/dsub/fragments/MainFragment.java +++ b/src/github/daneren2005/dsub/fragments/MainFragment.java @@ -264,7 +264,7 @@ public class MainFragment extends SubsonicFragment { // Clear out recently added count when viewing
if("newest".equals(type)) {
SharedPreferences.Editor editor = Util.getPreferences(context).edit();
- editor.putInt(Constants.PREFERENCES_KEY_RECENT_COUNT, 0);
+ editor.putInt(Constants.PREFERENCES_KEY_RECENT_COUNT + Util.getActiveServer(context), 0);
editor.commit();
// Clear immediately so doesn't still show when pressing back
@@ -467,7 +467,7 @@ public class MainFragment extends SubsonicFragment { private void getMostRecentCount() {
// Use stashed value until after refresh occurs
SharedPreferences prefs = Util.getPreferences(context);
- final int startCount = prefs.getInt(Constants.PREFERENCES_KEY_RECENT_COUNT, 0);
+ final int startCount = prefs.getInt(Constants.PREFERENCES_KEY_RECENT_COUNT + Util.getActiveServer(context), 0);
setMostRecentCount(startCount);
new SilentBackgroundTask<Integer>(context) {
@@ -506,7 +506,7 @@ public class MainFragment extends SubsonicFragment { // Add the old count which will get cleared out after viewing recents
count += startCount;
SharedPreferences.Editor editor = Util.getPreferences(context).edit();
- editor.putInt(Constants.PREFERENCES_KEY_RECENT_COUNT, count);
+ editor.putInt(Constants.PREFERENCES_KEY_RECENT_COUNT + Util.getActiveServer(context), count);
editor.commit();
return count;
|