Fixed notification options dependency

pull/164/head
M66B 6 years ago
parent fbc1bcd9b3
commit 38cf9c73e1

@ -166,7 +166,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("notify_preview", checked).apply(); prefs.edit().putBoolean("notify_preview", checked).apply();
swWearablePreview.setEnabled(checked); enableOptions();
} }
}); });
@ -354,7 +354,6 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
swNotifySummary.setChecked(prefs.getBoolean("notify_summary", false)); swNotifySummary.setChecked(prefs.getBoolean("notify_summary", false));
swNotifyPreview.setChecked(prefs.getBoolean("notify_preview", true)); swNotifyPreview.setChecked(prefs.getBoolean("notify_preview", true));
swWearablePreview.setChecked(prefs.getBoolean("wearable_preview", true)); swWearablePreview.setChecked(prefs.getBoolean("wearable_preview", true));
swWearablePreview.setEnabled(swNotifyPreview.isChecked());
cbNotifyActionTrash.setChecked(prefs.getBoolean("notify_trash", true) || !pro); cbNotifyActionTrash.setChecked(prefs.getBoolean("notify_trash", true) || !pro);
cbNotifyActionJunk.setChecked(prefs.getBoolean("notify_junk", false) && pro); cbNotifyActionJunk.setChecked(prefs.getBoolean("notify_junk", false) && pro);
@ -379,6 +378,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
boolean checked = swNotifySummary.isChecked(); boolean checked = swNotifySummary.isChecked();
swNotifyPreview.setEnabled(!checked); swNotifyPreview.setEnabled(!checked);
swWearablePreview.setEnabled(!checked && swNotifyPreview.isChecked());
cbNotifyActionTrash.setEnabled(pro && !checked); cbNotifyActionTrash.setEnabled(pro && !checked);
cbNotifyActionJunk.setEnabled(pro && !checked); cbNotifyActionJunk.setEnabled(pro && !checked);
cbNotifyActionArchive.setEnabled(pro && !checked); cbNotifyActionArchive.setEnabled(pro && !checked);

Loading…
Cancel
Save