perf(network): Improved performance and reactiveness of the UI by speeding up network requests and clearing the channel whenever a request is cancelled/the UI is routing
This commit is contained in:
@@ -165,7 +165,7 @@ impl<'a> App<'a> {
|
||||
}
|
||||
|
||||
if self.is_routing {
|
||||
if self.is_loading && !self.should_refresh {
|
||||
if !self.should_refresh {
|
||||
self.cancellation_token.cancel();
|
||||
}
|
||||
|
||||
|
||||
@@ -582,7 +582,6 @@ mod tests {
|
||||
async fn test_radarr_on_tick_routing_while_long_request_is_running_should_cancel_request() {
|
||||
let (mut app, mut sync_network_rx) = construct_app_unit();
|
||||
app.is_routing = true;
|
||||
app.is_loading = true;
|
||||
app.should_refresh = false;
|
||||
|
||||
app
|
||||
|
||||
Reference in New Issue
Block a user