Added flagging from notification

This commit is contained in:
M66B
2019-05-06 10:33:29 +02:00
parent a128036d11
commit 4dbb17facc
6 changed files with 70 additions and 6 deletions

View File

@@ -44,8 +44,9 @@ public class FragmentOptionsNotifications extends FragmentBase {
private SwitchCompat swNotifyPreview;
private CheckBox cbNotifyActionTrash;
private CheckBox cbNotifyActionArchive;
private CheckBox cbNotifyActionSeen;
private CheckBox cbNotifyActionReply;
private CheckBox cbNotifyActionFlag;
private CheckBox cbNotifyActionSeen;
private SwitchCompat swLight;
private Button btnSound;
@@ -64,6 +65,7 @@ public class FragmentOptionsNotifications extends FragmentBase {
cbNotifyActionTrash = view.findViewById(R.id.cbNotifyActionTrash);
cbNotifyActionArchive = view.findViewById(R.id.cbNotifyActionArchive);
cbNotifyActionReply = view.findViewById(R.id.cbNotifyActionReply);
cbNotifyActionFlag = view.findViewById(R.id.cbNotifyActionFlag);
cbNotifyActionSeen = view.findViewById(R.id.cbNotifyActionSeen);
swLight = view.findViewById(R.id.swLight);
btnSound = view.findViewById(R.id.btnSound);
@@ -104,6 +106,13 @@ public class FragmentOptionsNotifications extends FragmentBase {
}
});
cbNotifyActionFlag.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
prefs.edit().putBoolean("notify_flag", checked).apply();
}
});
cbNotifyActionSeen.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
@@ -143,6 +152,7 @@ public class FragmentOptionsNotifications extends FragmentBase {
cbNotifyActionTrash.setChecked(prefs.getBoolean("notify_trash", true));
cbNotifyActionArchive.setChecked(prefs.getBoolean("notify_archive", true));
cbNotifyActionReply.setChecked(prefs.getBoolean("notify_reply", false));
cbNotifyActionFlag.setChecked(prefs.getBoolean("notify_flag", false));
cbNotifyActionSeen.setChecked(prefs.getBoolean("notify_seen", true));
swLight.setChecked(prefs.getBoolean("light", false));