refactor(ui): Simplified the popup delegation so all future UI is easier to implement

This commit is contained in:
2024-12-11 15:08:52 -07:00
parent e9a30382a3
commit c09950d0af
59 changed files with 488 additions and 660 deletions
+4 -12
View File
@@ -39,18 +39,10 @@ impl DrawUi for HistoryUi {
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
if let Route::Sonarr(active_sonarr_block, _) = app.get_current_route() {
match active_sonarr_block {
ActiveSonarrBlock::History
| ActiveSonarrBlock::HistorySortPrompt
| ActiveSonarrBlock::SearchHistory
| ActiveSonarrBlock::SearchHistoryError
| ActiveSonarrBlock::FilterHistory
| ActiveSonarrBlock::FilterHistoryError => draw_history_table(f, app, area),
ActiveSonarrBlock::HistoryItemDetails => {
draw_history_table(f, app, area);
draw_history_item_details_popup(f, app);
}
_ => (),
draw_history_table(f, app, area);
if active_sonarr_block == ActiveSonarrBlock::HistoryItemDetails {
draw_history_item_details_popup(f, app);
}
}
}