From 268f86a6886b28657f70c2b1e58b8666e2b960a0 Mon Sep 17 00:00:00 2001 From: stom79 Date: Sat, 11 Nov 2017 07:45:53 +0100 Subject: [PATCH] enforce the service activation with general notifications --- .../fr/gouv/etalab/mastodon/services/StreamingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/services/StreamingService.java b/app/src/main/java/fr/gouv/etalab/mastodon/services/StreamingService.java index 468e2990c..30db5cc4d 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/services/StreamingService.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/services/StreamingService.java @@ -117,7 +117,8 @@ public class StreamingService extends IntentService { protected void onHandleIntent(@Nullable Intent intent) { SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true); - if( liveNotifications){ + boolean notify = sharedpreferences.getBoolean(Helper.SET_NOTIFY, true); + if( liveNotifications && notify){ Iterator it = httpsURLConnections.entrySet().iterator(); while (it.hasNext()) { Map.Entry pair = (Map.Entry)it.next();