diff --git a/packages/harbour/lib/src/apps/news/blocs/articles.dart b/packages/harbour/lib/src/apps/news/blocs/articles.dart index 1ee0919c..ab939a3e 100644 --- a/packages/harbour/lib/src/apps/news/blocs/articles.dart +++ b/packages/harbour/lib/src/apps/news/blocs/articles.dart @@ -157,7 +157,7 @@ class NewsArticlesBloc extends $NewsArticlesBloc { getRead: getRead, ))!, (final response) => response.items, - previousData: _articlesSubject.hasValue ? _articlesSubject.value.data : null, + previousData: _articlesSubject.valueOrNull?.data, ) .listen(_articlesSubject.add); } diff --git a/packages/harbour/lib/src/apps/news/blocs/news.dart b/packages/harbour/lib/src/apps/news/blocs/news.dart index 6a74945c..a6e264d7 100644 --- a/packages/harbour/lib/src/apps/news/blocs/news.dart +++ b/packages/harbour/lib/src/apps/news/blocs/news.dart @@ -187,7 +187,7 @@ class NewsBloc extends $NewsBloc { 'news-folders', () async => (await client.news.listFolders())!, (final response) => response.folders, - previousData: _foldersSubject.hasValue ? _foldersSubject.value.data : null, + previousData: _foldersSubject.valueOrNull?.data, ) .listen(_foldersSubject.add); } @@ -203,7 +203,7 @@ class NewsBloc extends $NewsBloc { _newestItemId = response.newestItemId; return response.feeds; }, - previousData: _feedsSubject.hasValue ? _feedsSubject.value.data : null, + previousData: _feedsSubject.valueOrNull?.data, ).listen(_feedsSubject.add); } diff --git a/packages/harbour/lib/src/apps/notes/blocs/notes.dart b/packages/harbour/lib/src/apps/notes/blocs/notes.dart index 81372db8..f2eb40ca 100644 --- a/packages/harbour/lib/src/apps/notes/blocs/notes.dart +++ b/packages/harbour/lib/src/apps/notes/blocs/notes.dart @@ -77,7 +77,7 @@ class NotesBloc extends $NotesBloc { 'notes-notes', () async => (await client.notes.getNotes())!, (final response) => response, - previousData: _notesSubject.hasValue ? _notesSubject.value.data : null, + previousData: _notesSubject.valueOrNull?.data, ) .listen(_notesSubject.add); }