Krolyxon
Commit 7c318f4

rmptui7c318f4

fix #5

Author
krolxon
Date
2024-05-24 15:04 +0530
Parent
be5b0cb
Commit
7c318f448e01cb0005c62df71b42ab2f38a36f3f

+6 −0

1 file changed

  1. M src/event/pl_append_keys.rs +6 −0
M src/event/pl_append_keys.rs View
@@ -18,6 +18,12 @@ pub fn hande_pl_append_keys(key_event: KeyEvent, app: &mut App) -> AppResult<()>
1818
1919 match app.selected_tab {
2020 SelectedTab::Queue => {
21+ // Just exit out the menu if no item is selected in the Queue
22+ if app.queue_list.list.is_empty() {
23+ app.playlist_popup = false;
24+ return Ok(());
25+ }
26+
2127 let short_path = &app.queue_list.get_item_at_current_index().file;
2228
2329 if let Some(full_path) = app.conn.get_full_path(short_path) {