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:
@@ -431,11 +431,13 @@ class DatabaseHelper {
|
||||
|
||||
Future<List<Map<String, dynamic>>> getPendingNotifications() async {
|
||||
Database db = await database;
|
||||
return await db.query(
|
||||
notificationTrackingTable,
|
||||
where: 'status IN (?, ?)',
|
||||
whereArgs: ['pending', 'retrying'],
|
||||
);
|
||||
return await db.rawQuery('''
|
||||
SELECT nt.*, s.name as supplementName
|
||||
FROM $notificationTrackingTable nt
|
||||
LEFT JOIN $supplementsTable s ON nt.supplementId = s.id
|
||||
WHERE nt.status IN (?, ?)
|
||||
ORDER BY nt.scheduledTime ASC
|
||||
''', ['pending', 'retrying']);
|
||||
}
|
||||
|
||||
Future<void> markNotificationExpired(int notificationId) async {
|
||||
|
Reference in New Issue
Block a user