Fix null pointer exception

pull/574/head
Alex Baker 7 years ago
parent a01830eb9c
commit fdd0115d32

@ -163,11 +163,13 @@ public class NotificationManager {
if (existingNotifications.size() == 1) { if (existingNotifications.size() == 1) {
org.tasks.notifications.Notification notification = existingNotifications.get(0); org.tasks.notifications.Notification notification = existingNotifications.get(0);
NotificationCompat.Builder builder = getTaskNotification(notification) NotificationCompat.Builder builder = getTaskNotification(notification);
.setGroup(GROUP_KEY) if (builder != null) {
builder.setGroup(GROUP_KEY)
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY); .setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY);
notify(notification.taskId, builder, false, false, false); notify(notification.taskId, builder, false, false, false);
} }
}
if (atLeastNougat() && newNotifications.size() == 1) { if (atLeastNougat() && newNotifications.size() == 1) {
org.tasks.notifications.Notification notification = newNotifications.get(0); org.tasks.notifications.Notification notification = newNotifications.get(0);

Loading…
Cancel
Save