aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java16
1 files changed, 16 insertions, 0 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 d67893ef..dc64e9d1 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -954,6 +954,22 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
runnable.run();
} else {
afterServiceAvailable.add(runnable);
+ checkIfServiceAvailable();
+ }
+ }
+ private void checkIfServiceAvailable() {
+ if(getDownloadService() == null) {
+ handler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ checkIfServiceAvailable();
+ }
+ }, 50);
+ } else if(afterServiceAvailable.size() > 0) {
+ for(Runnable runnable: afterServiceAvailable) {
+ handler.post(runnable);
+ }
+ afterServiceAvailable.clear();
}
}