Web app fix (#195)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-11-08 13:38:02 -05:00
1 parent 38a1d9a950
commit 2eb0cf88af
2 files changed
+18 -2

No files matched your search

@@ -99,8 +99,23 @@
return;
}
feedLoadState = FeedLoadState.Loading;
if (loadDataTask) {
return;
}
try {
loadDataTask = loadData();
await loadDataTask;
} catch (error) {
console.error(error);
}
loadDataTask = undefined;
}
let loadDataTask;
async function loadData() {
feedLoadState = FeedLoadState.Loading;
let totalFetchedItems = 0;
while (true) {
@@ -152,7 +167,7 @@
if (
feedSource.state.loadState === FeedLoadState.Loaded &&
feedSourcesIndex === feedSources.length - 1
feedSourcesIndex >= feedSources.length - 1
) {
feedLoadState = FeedLoadState.Loaded;
} else {