diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-03-12 11:32:36 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-03-12 11:32:36 -0700 |
commit | 609c0aa6d1ce5f8bc1971954795975c7670b80eb (patch) | |
tree | e26652ef7a7b3dce6147c47c2f9835b35675ea56 | |
parent | 28f7bdeede8609b365219caf6e998f3e31905d5f (diff) | |
parent | e907fccd2d08c64ac000f7c2e7a7a4802f9dba5f (diff) | |
download | dsub-609c0aa6d1ce5f8bc1971954795975c7670b80eb.tar.gz dsub-609c0aa6d1ce5f8bc1971954795975c7670b80eb.tar.bz2 dsub-609c0aa6d1ce5f8bc1971954795975c7670b80eb.zip |
Merge branch 'alphabeticalfix'
4 files changed, 16 insertions, 5 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 36a7c8a4..8f7effe7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,7 +2,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="github.daneren2005.dsub"
android:installLocation="internalOnly"
- android:versionCode="147"
+ android:versionCode="148"
android:versionName="4.9.4">
<instrumentation android:name="android.test.InstrumentationTestRunner"
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
|