|
|
|
@ -59,6 +59,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|
|
|
|
private CheckBox cbNotifyActionFlag;
|
|
|
|
|
private CheckBox cbNotifyActionSeen;
|
|
|
|
|
private TextView tvNotifyActionsPro;
|
|
|
|
|
private SwitchCompat swBiometricsNotify;
|
|
|
|
|
private Button btnManage;
|
|
|
|
|
private TextView tvManageHint;
|
|
|
|
|
private ImageButton ibManage;
|
|
|
|
@ -69,7 +70,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"badge", "unseen_ignored",
|
|
|
|
|
"notify_preview", "notify_trash", "notify_archive", "notify_reply", "notify_flag", "notify_seen",
|
|
|
|
|
"notify_preview", "notify_trash", "notify_archive", "notify_reply", "notify_flag", "notify_seen", "biometrics_notify",
|
|
|
|
|
"light", "sound"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -92,6 +93,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|
|
|
|
cbNotifyActionFlag = view.findViewById(R.id.cbNotifyActionFlag);
|
|
|
|
|
cbNotifyActionSeen = view.findViewById(R.id.cbNotifyActionSeen);
|
|
|
|
|
tvNotifyActionsPro = view.findViewById(R.id.tvNotifyActionsPro);
|
|
|
|
|
swBiometricsNotify = view.findViewById(R.id.swBiometricsNotify);
|
|
|
|
|
btnManage = view.findViewById(R.id.btnManage);
|
|
|
|
|
tvManageHint = view.findViewById(R.id.tvManageHint);
|
|
|
|
|
ibManage = view.findViewById(R.id.ibManage);
|
|
|
|
@ -167,6 +169,13 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|
|
|
|
|
|
|
|
|
Helper.linkPro(tvNotifyActionsPro);
|
|
|
|
|
|
|
|
|
|
swBiometricsNotify.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("biometrics_notify", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
final Intent manage = getIntentNotifications(getContext());
|
|
|
|
|
btnManage.setVisibility(manage.resolveActivity(pm) == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
btnManage.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@ -273,6 +282,8 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
|
|
|
|
|
cbNotifyActionFlag.setEnabled(pro);
|
|
|
|
|
cbNotifyActionSeen.setEnabled(pro);
|
|
|
|
|
|
|
|
|
|
swBiometricsNotify.setChecked(prefs.getBoolean("biometrics_notify", false));
|
|
|
|
|
|
|
|
|
|
swLight.setChecked(prefs.getBoolean("light", false));
|
|
|
|
|
|
|
|
|
|
grpNotification.setVisibility(Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
|
|
|
|