|
|
@ -95,27 +95,29 @@ class NewsBloc extends InteractiveBloc implements NewsBlocEvents, NewsBlocStates |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Future refresh() async { |
|
|
|
Future refresh() async { |
|
|
|
await requestManager.wrapNextcloud<List<NewsFolder>, NewsListFolders>( |
|
|
|
await Future.wait([ |
|
|
|
client.id, |
|
|
|
requestManager.wrapNextcloud<List<NewsFolder>, NewsListFolders>( |
|
|
|
'news-folders', |
|
|
|
client.id, |
|
|
|
folders, |
|
|
|
'news-folders', |
|
|
|
() async => client.news.listFolders(), |
|
|
|
folders, |
|
|
|
(final response) => response.folders, |
|
|
|
() async => client.news.listFolders(), |
|
|
|
); |
|
|
|
(final response) => response.folders, |
|
|
|
await requestManager.wrapNextcloud<List<NewsFeed>, NewsListFeeds>( |
|
|
|
), |
|
|
|
client.id, |
|
|
|
requestManager.wrapNextcloud<List<NewsFeed>, NewsListFeeds>( |
|
|
|
'news-feeds', |
|
|
|
client.id, |
|
|
|
feeds, |
|
|
|
'news-feeds', |
|
|
|
() async => client.news.listFeeds(), |
|
|
|
feeds, |
|
|
|
(final response) { |
|
|
|
() async => client.news.listFeeds(), |
|
|
|
// This is a bit ugly, but IDGAF right now |
|
|
|
(final response) { |
|
|
|
if (response.newestItemId != null) { |
|
|
|
// This is a bit ugly, but IDGAF right now |
|
|
|
_newestItemId = response.newestItemId!; |
|
|
|
if (response.newestItemId != null) { |
|
|
|
} |
|
|
|
_newestItemId = response.newestItemId!; |
|
|
|
return response.feeds; |
|
|
|
} |
|
|
|
}, |
|
|
|
return response.feeds; |
|
|
|
); |
|
|
|
}, |
|
|
|
await mainArticlesBloc.reload(); |
|
|
|
), |
|
|
|
|
|
|
|
mainArticlesBloc.reload(), |
|
|
|
|
|
|
|
]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|