1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Added fail-safe

This commit is contained in:
M66B 2021-09-27 17:07:03 +02:00
parent fec61b415e
commit 23122ec228

View file

@ -177,7 +177,13 @@ class NotificationHelper {
channel.setDescription(jchannel.getString("description"));
channel.setBypassDnd(jchannel.getBoolean("dnd"));
channel.setLockscreenVisibility(jchannel.getInt("visibility"));
int visibility = jchannel.getInt("visibility");
if (visibility == Notification.VISIBILITY_PRIVATE ||
visibility == Notification.VISIBILITY_PUBLIC ||
visibility == Notification.VISIBILITY_SECRET)
channel.setLockscreenVisibility(visibility);
channel.setShowBadge(jchannel.getBoolean("badge"));
if (jchannel.has("sound") && !jchannel.isNull("sound")) {