Merge pull request 'added_unread_allread_notification' (#157) from added_unread_allread_notification into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/157
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:tm_app/data/services/notification_service.dart';
|
||||
|
||||
class NotificationsRepository {
|
||||
NotificationsRepository({required NotificationsService notificationsService})
|
||||
: _notificationsService = notificationsService;
|
||||
: _notificationsService = notificationsService;
|
||||
|
||||
final NotificationsService _notificationsService;
|
||||
|
||||
@@ -12,13 +12,20 @@ class NotificationsRepository {
|
||||
required int limit,
|
||||
required int offset,
|
||||
}) async {
|
||||
return _notificationsService.getNotifications(
|
||||
return _notificationsService.getNotifications(limit: limit, offset: offset);
|
||||
}
|
||||
|
||||
Future<Result<Map<String, dynamic>>> markAllAsRead() async {
|
||||
return _notificationsService.markAllAsRead();
|
||||
}
|
||||
|
||||
Future<Result<NotificationResponseModel>> getUnreadNotifications({
|
||||
required int limit,
|
||||
required int offset,
|
||||
}) {
|
||||
return _notificationsService.getUnreadNotifications(
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
);
|
||||
}
|
||||
|
||||
Future<Result<NotificationResponseModel>> markAllAsRead() async {
|
||||
return _notificationsService.markAllAsRead();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user