From 8e75a88b6aa218fc356837013a284c304df6808a Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 11 Oct 2017 12:26:08 +0900 Subject: [PATCH] Try to fix notification not showing (ref #966) --- .../com/nutomic/syncthingandroid/service/SyncthingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/service/SyncthingService.java b/src/main/java/com/nutomic/syncthingandroid/service/SyncthingService.java index 0c025b80..93156220 100644 --- a/src/main/java/com/nutomic/syncthingandroid/service/SyncthingService.java +++ b/src/main/java/com/nutomic/syncthingandroid/service/SyncthingService.java @@ -202,6 +202,7 @@ public class SyncthingService extends Service implements } updateState(); mPreferences.registerOnSharedPreferenceChangeListener(this); + mNotificationHandler.updatePersistentNotification(this, mCurrentState); } /** @@ -211,7 +212,7 @@ public class SyncthingService extends Service implements private class StartupTask extends AsyncTask { public StartupTask() { - mCurrentState = State.STARTING; + onApiChange(State.STARTING); } @Override