From 230c75790c420d2975f44058a403430c9ccc2b64 Mon Sep 17 00:00:00 2001 From: krolxon Date: Wed, 22 May 2024 20:00:20 +0530 Subject: [PATCH] update_status() on pause --- src/event/handler.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/event/handler.rs b/src/event/handler.rs index 5a83c1e..29da20c 100755 --- a/src/event/handler.rs +++ b/src/event/handler.rs @@ -33,10 +33,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> { // Playback controls // Toggle Pause - KeyCode::Char('p') => app.conn.toggle_pause(), + KeyCode::Char('p') => { + app.conn.toggle_pause(); + app.conn.update_status(); + } // Pause - KeyCode::Char('s') => app.conn.pause(), + KeyCode::Char('s') => { + app.conn.pause(); + app.conn.update_status(); + } // Toggle rpeat KeyCode::Char('r') => { @@ -51,7 +57,10 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> { } // Dmenu prompt - KeyCode::Char('D') => app.conn.play_dmenu()?, + KeyCode::Char('D') => { + app.conn.play_dmenu()?; + app.conn.update_status(); + } // add to queue KeyCode::Char('a') => app.playlist_popup = true,