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