aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java
index 583686fa..66bd4e0b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java
@@ -82,11 +82,17 @@ public class MaterialYouService extends Service {
MaterialYouUtils.changeTheme(this, executor, new Handler(), redditDataRoomDatabase,
customThemeWrapper, lightThemeSharedPreferences, darkThemeSharedPreferences,
amoledThemeSharedPreferences, () -> {
- stopForeground(true);
- stopSelf();
+ stopService();
});
+ } else {
+ stopService();
}
return START_NOT_STICKY;
}
+
+ private void stopService() {
+ stopForeground(true);
+ stopSelf();
+ }
} \ No newline at end of file