fix(ui): Fixed a bug that would freeze all user input while background network requests were running

This commit is contained in:
2024-11-06 15:50:47 -07:00
parent 8c90221a81
commit 0d8803d35d
6 changed files with 68 additions and 62 deletions
+1 -4
View File
@@ -75,10 +75,7 @@ impl<'a, 'b> Network<'a, 'b> {
}
pub(super) async fn reset_cancellation_token(&mut self) {
let mut app = self.app.lock().await;
self.cancellation_token = app.reset_cancellation_token();
app.should_refresh = true;
app.is_loading = false;
self.cancellation_token = self.app.lock().await.reset_cancellation_token();
}
async fn handle_request<B, R>(