diff --git a/packages/neon/neon_notifications/lib/blocs/notifications.dart b/packages/neon/neon_notifications/lib/blocs/notifications.dart index cb683e67..d246eeb6 100644 --- a/packages/neon/neon_notifications/lib/blocs/notifications.dart +++ b/packages/neon/neon_notifications/lib/blocs/notifications.dart @@ -26,15 +26,18 @@ class NotificationsBloc extends InteractiveBloc }); unawaited(refresh()); + _timer = TimerBloc().registerTimer(const Duration(seconds: 30), refresh); } @override final NotificationsAppSpecificOptions options; final RequestManager _requestManager; final NextcloudClient _client; + late final NeonTimer _timer; @override void dispose() { + _timer.cancel(); unawaited(notifications.close()); unawaited(unreadCounter.close()); super.dispose();