aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2024-05-22 20:00:20 +0530
committerkrolxon <krolyxon@tutanota.com>2024-05-22 20:00:20 +0530
commit230c75790c420d2975f44058a403430c9ccc2b64 (patch)
tree5ddca72387d9fda0c3bd3ba5a9012e7bcc949a06
parent380a4193c920bb90606ef4590ad5111161fedfc7 (diff)
update_status() on pause
-rwxr-xr-xsrc/event/handler.rs15
1 files 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,