aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index 2a06b5c6..d8158f7d 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -573,11 +573,19 @@ public class SubsonicActivity extends SherlockFragmentActivity implements OnItem
}
public void invalidate() {
+ FragmentTransaction trans = getSupportFragmentManager().beginTransaction();
for (int i = 0; i < frags.size(); i++) {
- List fragStack = (List)frags.get(i);
- SubsonicFragment frag = (SubsonicFragment)fragStack.get(fragStack.size() - 1);
+ List<SubsonicFragment> fragStack = frags.get(i);
+
+ for(int j = fragStack.size() - 1; j > 0; j--) {
+ SubsonicFragment oldFrag = fragStack.remove(j);
+ trans.remove((Fragment)oldFrag);
+ }
+
+ SubsonicFragment frag = (SubsonicFragment)fragStack.get(0);
frag.invalidate();
}
+ trans.commit();
}
public void onSaveInstanceState(Bundle savedInstanceState) {