mirror of https://github.com/M66B/FairEmail.git
Set bypass DND for high priority notifications
This commit is contained in:
parent
26db18714b
commit
b7366afaf9
|
@ -3640,6 +3640,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
channel.setGroup("contacts");
|
channel.setGroup("contacts");
|
||||||
channel.setDescription(from.getPersonal());
|
channel.setDescription(from.getPersonal());
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
channel.setBypassDnd(true);
|
||||||
channel.enableLights(true);
|
channel.enableLights(true);
|
||||||
nm.createNotificationChannel(channel);
|
nm.createNotificationChannel(channel);
|
||||||
onActionEditChannel();
|
onActionEditChannel();
|
||||||
|
|
|
@ -190,6 +190,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
channel.setGroup(group.getId());
|
channel.setGroup(group.getId());
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
channel.setBypassDnd(true);
|
||||||
channel.enableLights(true);
|
channel.enableLights(true);
|
||||||
nm.createNotificationChannel(channel);
|
nm.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ class NotificationHelper {
|
||||||
notification.enableLights(true);
|
notification.enableLights(true);
|
||||||
notification.setLightColor(Color.YELLOW);
|
notification.setLightColor(Color.YELLOW);
|
||||||
notification.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
notification.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
notification.setBypassDnd(true);
|
||||||
nm.createNotificationChannel(notification);
|
nm.createNotificationChannel(notification);
|
||||||
|
|
||||||
NotificationChannel progress = new NotificationChannel(
|
NotificationChannel progress = new NotificationChannel(
|
||||||
|
@ -91,6 +92,7 @@ class NotificationHelper {
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
update.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
|
update.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
|
||||||
update.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
update.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
update.setBypassDnd(true);
|
||||||
nm.createNotificationChannel(update);
|
nm.createNotificationChannel(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +101,7 @@ class NotificationHelper {
|
||||||
"warning", context.getString(R.string.channel_warning),
|
"warning", context.getString(R.string.channel_warning),
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
warning.setBypassDnd(true);
|
||||||
nm.createNotificationChannel(warning);
|
nm.createNotificationChannel(warning);
|
||||||
|
|
||||||
// Errors
|
// Errors
|
||||||
|
@ -107,6 +110,7 @@ class NotificationHelper {
|
||||||
context.getString(R.string.channel_error),
|
context.getString(R.string.channel_error),
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
error.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
error.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
error.setBypassDnd(true);
|
||||||
nm.createNotificationChannel(error);
|
nm.createNotificationChannel(error);
|
||||||
|
|
||||||
// Server alerts
|
// Server alerts
|
||||||
|
@ -115,6 +119,7 @@ class NotificationHelper {
|
||||||
context.getString(R.string.channel_alert),
|
context.getString(R.string.channel_alert),
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
alerts.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
alerts.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
alerts.setBypassDnd(true);
|
||||||
nm.createNotificationChannel(alerts);
|
nm.createNotificationChannel(alerts);
|
||||||
|
|
||||||
// Contacts grouping
|
// Contacts grouping
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class TupleFolderEx extends EntityFolder implements Serializable {
|
||||||
NotificationManager.IMPORTANCE_HIGH);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
channel.setGroup(group.getId());
|
channel.setGroup(group.getId());
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
channel.setBypassDnd(true);
|
||||||
channel.enableLights(true);
|
channel.enableLights(true);
|
||||||
nm.createNotificationChannel(channel);
|
nm.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue