refactor(ui): Simplified the popup delegation so all future UI is easier to implement
This commit is contained in:
@@ -32,12 +32,10 @@ impl DrawUi for BlocklistUi {
|
||||
|
||||
fn draw(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
if let Route::Radarr(active_radarr_block, _) = app.get_current_route() {
|
||||
draw_blocklist_table(f, app, area);
|
||||
|
||||
match active_radarr_block {
|
||||
ActiveRadarrBlock::Blocklist | ActiveRadarrBlock::BlocklistSortPrompt => {
|
||||
draw_blocklist_table(f, app, area)
|
||||
}
|
||||
ActiveRadarrBlock::BlocklistItemDetails => {
|
||||
draw_blocklist_table(f, app, area);
|
||||
draw_blocklist_item_details_popup(f, app);
|
||||
}
|
||||
ActiveRadarrBlock::DeleteBlocklistItemPrompt => {
|
||||
@@ -55,7 +53,6 @@ impl DrawUi for BlocklistUi {
|
||||
.prompt(&prompt)
|
||||
.yes_no_value(app.data.radarr_data.prompt_confirm);
|
||||
|
||||
draw_blocklist_table(f, app, area);
|
||||
f.render_widget(
|
||||
Popup::new(confirmation_prompt).size(Size::MediumPrompt),
|
||||
f.area(),
|
||||
@@ -67,7 +64,6 @@ impl DrawUi for BlocklistUi {
|
||||
.prompt("Do you want to clear your blocklist?")
|
||||
.yes_no_value(app.data.radarr_data.prompt_confirm);
|
||||
|
||||
draw_blocklist_table(f, app, area);
|
||||
f.render_widget(
|
||||
Popup::new(confirmation_prompt).size(Size::SmallPrompt),
|
||||
f.area(),
|
||||
|
||||
Reference in New Issue
Block a user