fix edit deck bug

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-12-11 12:00:59 -05:00
parent c08b5a6662
commit 06c9023e30
4 changed files with 28 additions and 20 deletions

View File

@@ -192,10 +192,6 @@ impl RenderNavResponse {
);
}
if let Some(Route::EditDeck(index)) = r {
SwitchingAction::Decks(DecksAction::Removing(index)).process(app);
}
switching_occured = true;
}
@@ -318,6 +314,7 @@ fn render_nav_body(
resp
}
Route::EditDeck(index) => {
let mut action = None;
let cur_deck = get_decks_mut(&app.accounts, &mut app.decks_cache)
.decks_mut()
.get_mut(*index)
@@ -338,7 +335,9 @@ fn render_nav_body(
cur_deck.edit(configure_deck_response);
}
EditDeckResponse::Delete => {
deck_state.deleting = true;
action = Some(RenderNavAction::SwitchingAction(SwitchingAction::Decks(
DecksAction::Removing(*index),
)));
}
}
get_active_columns_mut(&app.accounts, &mut app.decks_cache)
@@ -346,7 +345,7 @@ fn render_nav_body(
.go_back();
}
None
action
}
}
}