Implement Asia/Manila Time Zone
Handled saving of Relievers
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
import '../models/notification_item.dart';
|
||||
import 'profile_provider.dart';
|
||||
import 'supabase_provider.dart';
|
||||
import '../utils/app_time.dart';
|
||||
|
||||
final notificationsProvider = StreamProvider<List<NotificationItem>>((ref) {
|
||||
final userId = ref.watch(currentUserIdProvider);
|
||||
@@ -69,7 +70,7 @@ class NotificationsController {
|
||||
Future<void> markRead(String id) async {
|
||||
await _client
|
||||
.from('notifications')
|
||||
.update({'read_at': DateTime.now().toUtc().toIso8601String()})
|
||||
.update({'read_at': AppTime.nowUtc().toIso8601String()})
|
||||
.eq('id', id);
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ class NotificationsController {
|
||||
if (userId == null) return;
|
||||
await _client
|
||||
.from('notifications')
|
||||
.update({'read_at': DateTime.now().toUtc().toIso8601String()})
|
||||
.update({'read_at': AppTime.nowUtc().toIso8601String()})
|
||||
.eq('ticket_id', ticketId)
|
||||
.eq('user_id', userId)
|
||||
.filter('read_at', 'is', null);
|
||||
@@ -89,7 +90,7 @@ class NotificationsController {
|
||||
if (userId == null) return;
|
||||
await _client
|
||||
.from('notifications')
|
||||
.update({'read_at': DateTime.now().toUtc().toIso8601String()})
|
||||
.update({'read_at': AppTime.nowUtc().toIso8601String()})
|
||||
.eq('task_id', taskId)
|
||||
.eq('user_id', userId)
|
||||
.filter('read_at', 'is', null);
|
||||
|
||||
Reference in New Issue
Block a user