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");
|
MaterialSwitchPreference notificationPreference = findPreference("enable_status_notification");
|
||||||
if (notificationPreference != null) {
|
if (notificationPreference != null) {
|
||||||
notificationPreference.setVisible(installed);
|
notificationPreference.setVisible(installed);
|
||||||
if (installed && App.isParasitic) {
|
if (installed) {
|
||||||
notificationPreference.setChecked(setNotificationPreferenceEnabled(notificationPreference, ShortcutUtil.isLaunchShortcutPinned()));
|
notificationPreference.setChecked(setNotificationPreferenceEnabled(notificationPreference, !App.isParasitic || ShortcutUtil.isLaunchShortcutPinned()));
|
||||||
}
|
}
|
||||||
notificationPreference.setOnPreferenceChangeListener((p, v) -> {
|
notificationPreference.setOnPreferenceChangeListener((p, v) -> {
|
||||||
var succeeded = ConfigManager.setEnableStatusNotification((boolean) v);
|
var succeeded = ConfigManager.setEnableStatusNotification((boolean) v);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue