diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-11-28 17:23:10 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-11-28 17:23:10 -0800 |
commit | a3491e87a986d67a89f8951a34a587ab2fc9e10f (patch) | |
tree | 1fb043c64f7d70d638541ccd6c17df7cec55374b /app | |
parent | 3f196441d0683977d456528bdf7f32ba24eee175 (diff) | |
download | dsub-a3491e87a986d67a89f8951a34a587ab2fc9e10f.tar.gz dsub-a3491e87a986d67a89f8951a34a587ab2fc9e10f.tar.bz2 dsub-a3491e87a986d67a89f8951a34a587ab2fc9e10f.zip |
Fix crash with rotating in offline mode
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 0b10d7fb..a1c5ceef 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -250,12 +250,20 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte return; } - populateTabs(); getImageLoader().onUIVisible(); UpdateView.addActiveActivity(); } @Override + protected void onResume() { + super.onResume(); + + // If this is in onStart is causes crashes when rotating screen in offline mode + // Actual root cause of error is `drawerItemSelected(newFragment);` in the offline mode branch of code + populateTabs(); + } + + @Override protected void onStop() { super.onStop(); |