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

+1
View File
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- A rare bug that causes the app to crash when displaying video cells - A rare bug that causes the app to crash when displaying video cells
- A bug where bookmarks show duplicate videos
## [0.15.0] - 2023-11-05 ## [0.15.0] - 2023-11-05
@@ -99,8 +99,23 @@
return; 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; let totalFetchedItems = 0;
while (true) { while (true) {
@@ -152,7 +167,7 @@
if ( if (
feedSource.state.loadState === FeedLoadState.Loaded && feedSource.state.loadState === FeedLoadState.Loaded &&
feedSourcesIndex === feedSources.length - 1 feedSourcesIndex >= feedSources.length - 1
) { ) {
feedLoadState = FeedLoadState.Loaded; feedLoadState = FeedLoadState.Loaded;
} else { } else {