From 51fbf426531fc9843afbbd7736eb5c3564f39658 Mon Sep 17 00:00:00 2001 From: krolxon Date: Mon, 29 Apr 2024 11:55:07 +0530 Subject: [PATCH] fix >/< keybinds --- src/handler.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index c9d4d04..c9df412 100755 --- a/src/handler.rs +++ b/src/handler.rs @@ -275,12 +275,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> { // Play next song KeyCode::Char('>') => { - app.conn.conn.next()?; + if !app.queue_list.list.is_empty() { + app.conn.conn.next()?; + } } // Play previous song KeyCode::Char('<') => { - app.conn.conn.prev()?; + if !app.queue_list.list.is_empty() { + app.conn.conn.prev()?; + } } // Volume controls