1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Show notification badge if user interaction is required (#1310)

This commit is contained in:
Catfriend1 2019-04-27 10:14:39 +02:00 committed by Audrius Butkevicius
parent 6a36c2d5c0
commit cc4d1b4fcf

View file

@ -57,7 +57,7 @@ public class NotificationHandler {
mPersistentChannel.enableLights(false); mPersistentChannel.enableLights(false);
mPersistentChannel.enableVibration(false); mPersistentChannel.enableVibration(false);
mPersistentChannel.setSound(null, null); mPersistentChannel.setSound(null, null);
mPersistentChannel.setShowBadge(false); // Disables the dot next to the app icon mPersistentChannel.setShowBadge(false);
mNotificationManager.createNotificationChannel(mPersistentChannel); mNotificationManager.createNotificationChannel(mPersistentChannel);
mPersistentChannelWaiting = new NotificationChannel( mPersistentChannelWaiting = new NotificationChannel(
@ -66,6 +66,7 @@ public class NotificationHandler {
mPersistentChannelWaiting.enableLights(false); mPersistentChannelWaiting.enableLights(false);
mPersistentChannelWaiting.enableVibration(false); mPersistentChannelWaiting.enableVibration(false);
mPersistentChannelWaiting.setSound(null, null); mPersistentChannelWaiting.setSound(null, null);
mPersistentChannelWaiting.setShowBadge(false);
mNotificationManager.createNotificationChannel(mPersistentChannelWaiting); mNotificationManager.createNotificationChannel(mPersistentChannelWaiting);
mInfoChannel = new NotificationChannel( mInfoChannel = new NotificationChannel(
@ -73,6 +74,7 @@ public class NotificationHandler {
NotificationManager.IMPORTANCE_LOW); NotificationManager.IMPORTANCE_LOW);
mPersistentChannel.enableVibration(false); mPersistentChannel.enableVibration(false);
mPersistentChannel.setSound(null, null); mPersistentChannel.setSound(null, null);
mPersistentChannel.setShowBadge(true);
mNotificationManager.createNotificationChannel(mInfoChannel); mNotificationManager.createNotificationChannel(mInfoChannel);
} else { } else {
mPersistentChannel = null; mPersistentChannel = null;