aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-02-11 17:39:47 -0800
committerScott Jackson <daneren2005@gmail.com>2016-02-11 17:39:47 -0800
commit6e2fc490b0fac6b1817955aec688949481148407 (patch)
tree87776be9a8330fcd7b511533678c73bc201c2606 /app/src/main
parentc0418f69cd12d1e196b1ff9d1e1af087b41ecbfe (diff)
downloaddsub-6e2fc490b0fac6b1817955aec688949481148407.tar.gz
dsub-6e2fc490b0fac6b1817955aec688949481148407.tar.bz2
dsub-6e2fc490b0fac6b1817955aec688949481148407.zip
Fixes #642: fix First Level Artist interefering with Show Artist/Album
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java3
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java13
2 files changed, 11 insertions, 5 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index 9e18b47a..3bcd0864 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -154,7 +154,10 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
if(item != null) {
item.setChecked(true);
}
+ } else {
+ lastSelectedPosition = getDrawerItemId(fragmentType);
}
+
currentFragment = getNewFragment(fragmentType);
if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_ID)) {
Bundle currentArguments = currentFragment.getArguments();
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java
index 55351fb4..6890f572 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectArtistFragment.java
@@ -63,12 +63,14 @@ public class SelectArtistFragment extends SelectRecyclerFragment<Artist> impleme
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
Bundle args = getArguments();
if(args != null) {
- groupId = args.getString(Constants.INTENT_EXTRA_NAME_ID);
- groupName = args.getString(Constants.INTENT_EXTRA_NAME_NAME);
+ if(args.getBoolean(Constants.INTENT_EXTRA_NAME_ARTIST, false)) {
+ groupId = args.getString(Constants.INTENT_EXTRA_NAME_ID);
+ groupName = args.getString(Constants.INTENT_EXTRA_NAME_NAME);
- if(groupName != null) {
- setTitle(groupName);
- context.invalidateOptionsMenu();
+ if (groupName != null) {
+ setTitle(groupName);
+ context.invalidateOptionsMenu();
+ }
}
}
@@ -111,6 +113,7 @@ public class SelectArtistFragment extends SelectRecyclerFragment<Artist> impleme
Bundle args = new Bundle();
args.putString(Constants.INTENT_EXTRA_NAME_ID, artist.getId());
args.putString(Constants.INTENT_EXTRA_NAME_NAME, artist.getName());
+ args.putBoolean(Constants.INTENT_EXTRA_NAME_ARTIST, true);
if(ServerInfo.checkServerVersion(context, "1.13") && !Util.isOffline(context)) {
args.putSerializable(Constants.INTENT_EXTRA_NAME_DIRECTORY, new MusicDirectory.Entry(artist));
}