Krolyxon
Commit be5b0cb

rmptuibe5b0cb

update_status() on pause

Author
krolxon
Date
2024-05-22 20:00 +0530
Parent
6347e2e
Commit
be5b0cb0bdb1ef2d188ebc92b16aae5aa187f396

+12 −3

1 file changed

  1. M src/event/handler.rs +12 −3
M src/event/handler.rs View
@@ -33,10 +33,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
3333
3434 // Playback controls
3535 // Toggle Pause
36− KeyCode::Char('p') => app.conn.toggle_pause(),
36+ KeyCode::Char('p') => {
37+ app.conn.toggle_pause();
38+ app.conn.update_status();
39+ }
3740
3841 // Pause
39− KeyCode::Char('s') => app.conn.pause(),
42+ KeyCode::Char('s') => {
43+ app.conn.pause();
44+ app.conn.update_status();
45+ }
4046
4147 // Toggle rpeat
4248 KeyCode::Char('r') => {
@@ -51,7 +57,10 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
5157 }
5258
5359 // Dmenu prompt
54− KeyCode::Char('D') => app.conn.play_dmenu()?,
60+ KeyCode::Char('D') => {
61+ app.conn.play_dmenu()?;
62+ app.conn.update_status();
63+ }
5564
5665 // add to queue
5766 KeyCode::Char('a') => app.playlist_popup = true,