From fe0663b6cf0969c036d434a7b6ff2eff930e6b14 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 3 Dec 2013 21:35:05 -0800 Subject: #161 Add menu to show all media --- res/menu/select_album.xml | 4 ++++ res/values/strings.xml | 1 + src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/res/menu/select_album.xml b/res/menu/select_album.xml index 469561f1..8dc004f1 100644 --- a/res/menu/select_album.xml +++ b/res/menu/select_album.xml @@ -18,4 +18,8 @@ android:icon="?attr/shuffle" android:title="@string/menu.shuffle" compat:showAsAction="ifRoom|withText"/> + + diff --git a/res/values/strings.xml b/res/values/strings.xml index a6de6759..a292840f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -77,6 +77,7 @@ Add Channel Keep Synced Stop syncing + Show all media Playlists Update Information diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 5b54305b..b5a7d9ad 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -131,7 +131,6 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter albumListExtra = args.getString(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_EXTRA); albumListSize = args.getInt(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_SIZE, 0); refreshListing = args.getBoolean(Constants.INTENT_EXTRA_REFRESH_LISTINGS); - showAll = args.getBoolean(Constants.INTENT_EXTRA_VIEW_ALBUM, false); if(entries == null) { entries = (List) args.getSerializable(Constants.FRAGMENT_LIST); } @@ -228,6 +227,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter case R.id.menu_download_all: downloadAllPodcastEpisodes(); return true; + case R.id.menu_show_all: + showAll = true; + refresh(true); } if(super.onOptionsItemSelected(item)) { @@ -395,6 +397,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter List songs = new ArrayList(); getSongsRecursively(root, songs); root.replaceChildren(songs); + return root; } private void getSongsRecursively(MusicDirectory parent, List songs) throws Exception { -- cgit v1.2.3