From b0bbed9aa7d8d982c5f31a244208472da5468392 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 11 May 2013 15:30:55 -0700 Subject: If doing an album list, insert parent into backstack --- .../daneren2005/dsub/fragments/SelectDirectoryFragment.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 1d7c0073..5ebbd7e9 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -114,6 +114,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter } else { invalidated = true; } + if(name != null) { + setTitle(name); + } return rootView; } @@ -224,6 +227,16 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if (position >= 0) { MusicDirectory.Entry entry = (MusicDirectory.Entry) parent.getItemAtPosition(position); if (entry.isDirectory()) { + if(albumListType != null) { + SubsonicFragment parentFragment = new SelectDirectoryFragment(); + Bundle args = new Bundle(); + args.putString(Constants.INTENT_EXTRA_NAME_ID, entry.getParent()); + args.putString(Constants.INTENT_EXTRA_NAME_NAME, entry.getArtist()); + parentFragment.setArguments(args); + + replaceFragment(parentFragment, R.id.select_album_layout); + } + SubsonicFragment fragment = new SelectDirectoryFragment(); Bundle args = new Bundle(); args.putString(Constants.INTENT_EXTRA_NAME_ID, entry.getId()); -- cgit v1.2.3