aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-23 23:30:45 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-23 23:30:45 -0700
commit011a7e2ec6b0face64bcc8841ff5b8d3ad3db44f (patch)
treee70f79b041ccbe07416712a87c6e933b0a31194a /subsonic-android
parent70a04bed49e184d9b29fa6c89e5964380bb3dc4f (diff)
downloaddsub-011a7e2ec6b0face64bcc8841ff5b8d3ad3db44f.tar.gz
dsub-011a7e2ec6b0face64bcc8841ff5b8d3ad3db44f.tar.bz2
dsub-011a7e2ec6b0face64bcc8841ff5b8d3ad3db44f.zip
Fix if you jump straight to chat tab
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/AndroidManifest.xml2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java9
2 files changed, 9 insertions, 2 deletions
diff --git a/subsonic-android/AndroidManifest.xml b/subsonic-android/AndroidManifest.xml
index c9bf87b4..104feaea 100644
--- a/subsonic-android/AndroidManifest.xml
+++ b/subsonic-android/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="49"
+ android:versionCode="50"
android:versionName="4.0.1">
<uses-permission android:name="android.permission.INTERNET"/>
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
index 15b8421f..cb4cac6f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -404,7 +404,14 @@ public class SubsonicActivity extends SherlockFragmentActivity implements OnItem
SubsonicFragment frag = (SubsonicFragment) Fragment.instantiate(activity, tabInfo.fragmentClass.getName(), tabInfo.args);
List<SubsonicFragment> fragStack = new ArrayList<SubsonicFragment>();
fragStack.add(frag);
- frags.add(i, fragStack);
+ while(i > frags.size()) {
+ frags.add(null);
+ }
+ if(i == frags.size()) {
+ frags.add(i, fragStack);
+ } else {
+ frags.set(i, fragStack);
+ }
if(currentFragment == null) {
currentFragment = frag;
currentFragment.setPrimaryFragment(true);