diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SearchFragment.java | 17 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 17 |
2 files changed, 3 insertions, 31 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java index 95810db0..b77df12b 100644 --- a/src/github/daneren2005/dsub/fragments/SearchFragment.java +++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java @@ -304,21 +304,8 @@ public class SearchFragment extends SubsonicFragment { }
private void onAlbumSelected(MusicDirectory.Entry album, boolean autoplay) {
- int id = R.id.fragment_list_layout;
- Bundle args;
- if(album.getParent() != null) {
- SubsonicFragment parentFragment = new SelectDirectoryFragment();
- args = new Bundle();
- args.putString(Constants.INTENT_EXTRA_NAME_ID, album.getParent());
- args.putString(Constants.INTENT_EXTRA_NAME_NAME, album.getArtist());
- parentFragment.setArguments(args);
-
- replaceFragment(parentFragment, R.id.fragment_list_layout);
- id = parentFragment.getRootId();
- }
-
SubsonicFragment fragment = new SelectDirectoryFragment();
- args = new Bundle();
+ Bundle args = new Bundle();
args.putString(Constants.INTENT_EXTRA_NAME_ID, album.getId());
args.putString(Constants.INTENT_EXTRA_NAME_NAME, album.getTitle());
if(autoplay) {
@@ -326,7 +313,7 @@ public class SearchFragment extends SubsonicFragment { }
fragment.setArguments(args);
- replaceFragment(fragment, id);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
private void onSongSelected(MusicDirectory.Entry song, boolean save, boolean append, boolean autoplay, boolean playNext) {
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index d213ecff..8077bf9f 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -303,28 +303,13 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if (position >= 0) {
MusicDirectory.Entry entry = (MusicDirectory.Entry) parent.getItemAtPosition(position);
if (entry.isDirectory()) {
- int fragId = rootId;
- /*if(albumListType != null && entry.getParent() != 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());
- if("recent".equals(albumListType)) {
- args.putBoolean(Constants.INTENT_EXTRA_REFRESH_LISTINGS, true);
- }
- parentFragment.setArguments(args);
-
- replaceFragment(parentFragment, fragId);
- fragId = parentFragment.getRootId();
- }*/
-
SubsonicFragment fragment = new SelectDirectoryFragment();
Bundle args = new Bundle();
args.putString(Constants.INTENT_EXTRA_NAME_ID, entry.getId());
args.putString(Constants.INTENT_EXTRA_NAME_NAME, entry.getTitle());
fragment.setArguments(args);
- replaceFragment(fragment, fragId, fragId == rootId);
+ replaceFragment(fragment, rootId, true);
} else if (entry.isVideo()) {
playVideo(entry);
} else if(entry instanceof PodcastEpisode) {
|