fix: Cancel all requests when switching Servarr tabs to both improve performance and fix issue #15

This commit is contained in:
2024-12-17 14:36:49 -07:00
parent 3ecaf04eb4
commit 368d5d3db7
3 changed files with 7 additions and 1 deletions
+2
View File
@@ -88,10 +88,12 @@ pub fn handle_events(key: Key, app: &mut App<'_>) {
app.reset();
app.server_tabs.next();
app.pop_and_push_navigation_stack(app.server_tabs.get_active_route());
app.cancellation_token.cancel();
} else if key == DEFAULT_KEYBINDINGS.previous_servarr.key {
app.reset();
app.server_tabs.previous();
app.pop_and_push_navigation_stack(app.server_tabs.get_active_route());
app.cancellation_token.cancel();
} else {
match app.get_current_route() {
Route::Radarr(active_radarr_block, context) => {