Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove redundant notification schedule call

laurenspriem5e33c645922c
diff --git a/mobile/apps/photos/lib/services/notification_service.dart b/mobile/apps/photos/lib/services/notification_service.dart
index c315d3e410..285d30dcab 100644
--- a/mobile/apps/photos/lib/services/notification_service.dart
+++ b/mobile/apps/photos/lib/services/notification_service.dart
@@ -175,6 +175,7 @@ class NotificationService {
priority: Priority.high,
category: AndroidNotificationCategory.reminder,
showWhen: false,
+ timeoutAfter: timeoutDurationAndroid?.inMilliseconds,
);
final iosSpecs = DarwinNotificationDetails(threadIdentifier: channelID);
final platformChannelSpecs =
@@ -208,39 +209,6 @@ class NotificationService {
s,
);
}
- final androidSpecs = AndroidNotificationDetails(
- channelID,
- channelName,
- channelDescription: 'ente alerts',
- importance: Importance.max,
- priority: Priority.high,
- category: AndroidNotificationCategory.reminder,
- showWhen: false,
- timeoutAfter: timeoutDurationAndroid?.inMilliseconds,
- );
- final iosSpecs = DarwinNotificationDetails(threadIdentifier: channelID);
- final platformChannelSpecs =
- NotificationDetails(android: androidSpecs, iOS: iosSpecs);
- final scheduledDate = tz.TZDateTime.local(
- dateTime.year,
- dateTime.month,
- dateTime.day,
- dateTime.hour,
- dateTime.minute,
- dateTime.second,
- );
- await _notificationsPlugin.zonedSchedule(
- id,
- title,
- message,
- scheduledDate,
- platformChannelSpecs,
- androidScheduleMode: AndroidScheduleMode.inexactAllowWhileIdle,
- payload: payload,
- );
- _logger.info(
- "Scheduled notification with: $title, $message, $channelID, $channelName, $payload",
- );
}
Future<void> clearAllScheduledNotifications({