From 875b235e6d0c3fdd29b84a4b855dac0088e1e8b7 Mon Sep 17 00:00:00 2001 From: sk Date: Thu, 19 Oct 2023 16:58:26 +0200 Subject: [PATCH] restart when show replies/boosts changes closes sk22#879 --- .../android/fragments/settings/SettingsBehaviorFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java index 93ccd17fa..62c32d8fb 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java @@ -176,6 +176,8 @@ public class SettingsBehaviorFragment extends BaseSettingsFragment impleme GlobalUserPreferences.allowRemoteLoading=remoteLoadingItem.checked; GlobalUserPreferences.save(); AccountLocalPreferences lp=getLocalPrefs(); + boolean restartPlease=lp.showBoosts!=showBoostsItem.checked + || lp.showReplies!=showRepliesItem.checked; lp.showBoosts=showBoostsItem.checked; lp.showReplies=showRepliesItem.checked; lp.save(); @@ -186,6 +188,7 @@ public class SettingsBehaviorFragment extends BaseSettingsFragment impleme s.preferences.postingDefaultLanguage=newPostLanguage.language.getLanguage(); s.savePreferencesLater(); } + if(restartPlease) getActivity().recreate(); } @Override