aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index 953b429a..80183c40 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -832,7 +832,11 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
@Override
public void onResume() {
super.onResume();
- onResumeHandlers();
+ if(this.primaryFragment) {
+ onResumeHandlers();
+ } else {
+ update();
+ }
}
private void onResumeHandlers() {
final Handler handler = new Handler();
@@ -894,11 +898,14 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
onPauseHandlers();
}
private void onPauseHandlers() {
- executorService.shutdown();
- if(getDownloadService() != null) {
- getDownloadService().stopRemoteScan();
+ if(executorService != null) {
+ executorService.shutdown();
+ if (getDownloadService() != null) {
+ getDownloadService().stopRemoteScan();
+ }
+ executorService = null;
+ playlistFlipper.setDisplayedChild(0);
}
- playlistFlipper.setDisplayedChild(0);
}
@Override