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:
parent
fec61b415e
commit
23122ec228
1 changed files with 7 additions and 1 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue