aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicActivity.java13
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java2
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java4
3 files changed, 15 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index e3ade434..e3094546 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -671,9 +671,18 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte
if(backStack.size() > 0) {
spinnerAdapter.clear();
for(int i = 0; i < backStack.size(); i++) {
- spinnerAdapter.add(backStack.get(i).getTitle());
+ CharSequence title = backStack.get(i).getTitle();
+ if(title != null) {
+ spinnerAdapter.add(title);
+ } else {
+ spinnerAdapter.add("null");
+ }
+ }
+ if(currentFragment.getTitle() != null) {
+ spinnerAdapter.add(currentFragment.getTitle());
+ } else {
+ spinnerAdapter.add("null");
}
- spinnerAdapter.add(currentFragment.getTitle());
spinnerAdapter.notifyDataSetChanged();
actionBarSpinner.setSelection(spinnerAdapter.getCount() - 1);
getSupportActionBar().setDisplayShowCustomEnabled(true);
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 1791cc49..aa34ca4b 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -644,7 +644,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
setTitle(R.string.main_albums_starred);
} else if("genres".equals(albumListType) || "years".equals(albumListType)) {
setTitle(albumListExtra);
- } else if("albumsAlphabeticalButton".equals(albumListType)) {
+ } else if("alphabeticalByName".equals(albumListType)) {
setTitle(R.string.main_albums_alphabetical);
}
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 0cb044e3..3a703b89 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -137,7 +137,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
- outState.putString(Constants.FRAGMENT_NAME, title.toString());
+ if(title != null) {
+ outState.putString(Constants.FRAGMENT_NAME, title.toString());
+ }
}
@Override