From 5310034d29d1c84fec8928058328758c259a8035 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 4 Feb 2014 07:23:21 -0800 Subject: Fix showAlbum breaking after change to where unique id is set --- src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 4 ++-- src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 5f4b0f6f..38d84bef 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -265,7 +265,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity { if(getIntent().hasExtra(Constants.INTENT_EXTRA_VIEW_ALBUM)) { int fragmentID = currentFragment != null ? currentFragment.getRootId() : R.id.fragment_list_layout; if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_PARENT_ID)) { - SubsonicFragment fragment = new SelectDirectoryFragment(); + SelectDirectoryFragment fragment = new SelectDirectoryFragment(); Bundle args = new Bundle(); args.putString(Constants.INTENT_EXTRA_NAME_ID, getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_PARENT_ID)); args.putString(Constants.INTENT_EXTRA_NAME_NAME, getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_PARENT_NAME)); @@ -273,7 +273,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity { fragment.setArguments(args); replaceFragment(fragment, R.id.fragment_list_layout, currentFragment.getSupportTag()); - fragmentID = fragment.getRootId(); + fragmentID = fragment.setRootId(); } SubsonicFragment fragment = new SelectDirectoryFragment(); diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index e36e0af3..e6b0e137 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -370,6 +370,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter public int getRootId() { return rootId; } + public int setRootId() { + rootId = getNewId(); + return rootId; + } private void load(boolean refresh) { if(refreshListing) { -- cgit v1.2.3