Always allow disable notification when not parasitic (#2667)

This commit is contained in:
Howard Wu 2023-08-05 08:27:58 +08:00 committed by GitHub
parent 348f04905f
commit ac675cc5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -127,7 +127,6 @@ public class LogsFragment extends BaseFragment implements MenuProvider {
this.optionsItemSelectListener = optionsItemSelectListener;
}
@SuppressLint("NotifyDataSetChanged")
@Override
public boolean onMenuItemSelected(@NonNull MenuItem item) {
var itemId = item.getItemId();

View File

@ -138,7 +138,7 @@ public class SettingsFragment extends BaseFragment {
public void onResume() {
super.onResume();
MaterialSwitchPreference notificationPreference = findPreference("enable_status_notification");
if (notificationPreference != null && notificationPreference.isVisible()) {
if (App.isParasitic && notificationPreference != null && notificationPreference.isVisible()) {
setNotificationPreferenceEnabled(notificationPreference, ShortcutUtil.isLaunchShortcutPinned());
}
}