aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-14 15:27:16 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-14 15:27:16 -0700
commitef4588a6950c0b64c5ceb3fe46782f4785b1cd94 (patch)
tree50bb764e4eefcefb34e2505ac4a4e7c4b50bd82b /src/github
parent08a434690ee25320a256242ee9c9f34926ece4f9 (diff)
downloaddsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.tar.gz
dsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.tar.bz2
dsub-ef4588a6950c0b64c5ceb3fe46782f4785b1cd94.zip
Fix all servers sharing a recently added count
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java6
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;