From ef4588a6950c0b64c5ceb3fe46782f4785b1cd94 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 14 Oct 2014 15:27:16 -0700 Subject: Fix all servers sharing a recently added count --- src/github/daneren2005/dsub/fragments/MainFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/github') 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(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; -- cgit v1.2.3