forked from eatvio/eatvio_app
feat(app): refactoring of sentry using, feat(become_consultant): fixed possible infinite loading, feat(push_notifications): fixed push navigation from paid plan push
This commit is contained in:
@@ -1,27 +1,16 @@
|
||||
import 'dart:developer';
|
||||
import 'package:eatvio_app/features/notifications/service/notifications_service.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
class NotificationsRepository {
|
||||
final NotificationsService notificationsService;
|
||||
NotificationsRepository({required this.notificationsService});
|
||||
|
||||
Future<Map<String, dynamic>?> getNotifications({required int page}) async {
|
||||
try {
|
||||
return await notificationsService.getNotifications(page: page);
|
||||
} catch (e, s) {
|
||||
log(e.toString());
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
return await notificationsService.getNotifications(page: page);
|
||||
|
||||
}
|
||||
|
||||
Future<void> markNotificationsAsRead() async {
|
||||
try {
|
||||
await notificationsService.markNotificationsAsRead();
|
||||
} catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
rethrow;
|
||||
}
|
||||
await notificationsService.markNotificationsAsRead();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user