mirror of
https://github.com/vleeuwenmenno/supplements.git
synced 2025-09-11 18:29:12 +02:00
feat: Implement pending notifications screen and enhance notification handling
This commit is contained in:
@@ -99,6 +99,7 @@ class SupplementProvider with ChangeNotifier {
|
||||
required int reminderRetryInterval,
|
||||
required int maxRetryAttempts,
|
||||
}) async {
|
||||
print('📱 🔄 MANUAL CHECK: Persistent reminders called from UI');
|
||||
await _notificationService.checkPersistentReminders(
|
||||
persistentReminders,
|
||||
reminderRetryInterval,
|
||||
@@ -106,6 +107,16 @@ class SupplementProvider with ChangeNotifier {
|
||||
);
|
||||
}
|
||||
|
||||
// Add a manual trigger method for testing
|
||||
Future<void> triggerRetryCheck() async {
|
||||
print('📱 🚨 MANUAL TRIGGER: Forcing retry check...');
|
||||
await checkPersistentRemindersWithSettings(
|
||||
persistentReminders: true,
|
||||
reminderRetryInterval: 5, // Force 5 minute interval for testing
|
||||
maxRetryAttempts: 3,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_persistentReminderTimer?.cancel();
|
||||
@@ -363,6 +374,11 @@ class SupplementProvider with ChangeNotifier {
|
||||
return await _notificationService.getPendingNotifications();
|
||||
}
|
||||
|
||||
// Get pending notifications with retry information from database
|
||||
Future<List<Map<String, dynamic>>> getTrackedNotifications() async {
|
||||
return await DatabaseHelper.instance.getPendingNotifications();
|
||||
}
|
||||
|
||||
// Debug method to test notification persistence
|
||||
Future<void> rescheduleAllNotifications() async {
|
||||
await _rescheduleAllNotifications();
|
||||
|
Reference in New Issue
Block a user