Fix refresh notification bug

This commit is contained in:
Nazar 2019-08-29 13:24:26 +03:00
parent d4cff1c405
commit b680721396

View file

@ -141,13 +141,13 @@ public abstract class OsmandNotification {
if (isEnabled()) { if (isEnabled()) {
Builder notificationBuilder = buildNotification(false); Builder notificationBuilder = buildNotification(false);
if (notificationBuilder != null) { if (notificationBuilder != null) {
Notification notification = getNotification(notificationBuilder); currentNotification = notificationBuilder.build();
setupNotification(notification); setupNotification(currentNotification);
if (top) { if (top) {
//notificationManager.cancel(getOsmandNotificationId()); //notificationManager.cancel(getOsmandNotificationId());
notificationManager.notify(TOP_NOTIFICATION_SERVICE_ID, notification); notificationManager.notify(TOP_NOTIFICATION_SERVICE_ID, currentNotification);
} else { } else {
notificationManager.notify(getOsmandNotificationId(), notification); notificationManager.notify(getOsmandNotificationId(), currentNotification);
} }
notifyWearable(notificationManager); notifyWearable(notificationManager);
return true; return true;