Browse Source

Merge pull request #457 from provokateurin/feature/poll-notifications

neon_notifications: Poll notifications
pull/459/head
Kate 1 year ago committed by GitHub
parent
commit
a2f030e302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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