Fix `notificationPreference` status (#2723)
This commit is contained in:
parent
37b38d8f1d
commit
bce03a864b
|
|
@ -173,8 +173,8 @@ public class SettingsFragment extends BaseFragment {
|
|||
MaterialSwitchPreference notificationPreference = findPreference("enable_status_notification");
|
||||
if (notificationPreference != null) {
|
||||
notificationPreference.setVisible(installed);
|
||||
if (installed && App.isParasitic) {
|
||||
notificationPreference.setChecked(setNotificationPreferenceEnabled(notificationPreference, ShortcutUtil.isLaunchShortcutPinned()));
|
||||
if (installed) {
|
||||
notificationPreference.setChecked(setNotificationPreferenceEnabled(notificationPreference, !App.isParasitic || ShortcutUtil.isLaunchShortcutPinned()));
|
||||
}
|
||||
notificationPreference.setOnPreferenceChangeListener((p, v) -> {
|
||||
var succeeded = ConfigManager.setEnableStatusNotification((boolean) v);
|
||||
|
|
|
|||
Loading…
Reference in New Issue