Browse Source

neon_notifications: Poll notifications

pull/457/head
jld3103 1 year ago
parent
commit
1c99e3f3a7
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 3
      packages/neon/neon_notifications/lib/blocs/notifications.dart

3
packages/neon/neon_notifications/lib/blocs/notifications.dart

@ -26,15 +26,18 @@ class NotificationsBloc extends InteractiveBloc
}); });
unawaited(refresh()); unawaited(refresh());
_timer = TimerBloc().registerTimer(const Duration(seconds: 30), refresh);
} }
@override @override
final NotificationsAppSpecificOptions options; final NotificationsAppSpecificOptions options;
final RequestManager _requestManager; final RequestManager _requestManager;
final NextcloudClient _client; final NextcloudClient _client;
late final NeonTimer _timer;
@override @override
void dispose() { void dispose() {
_timer.cancel();
unawaited(notifications.close()); unawaited(notifications.close());
unawaited(unreadCounter.close()); unawaited(unreadCounter.close());
super.dispose(); super.dispose();

Loading…
Cancel
Save