update_status() on pause

This commit is contained in:
krolxon 2024-05-22 20:00:20 +05:30
parent 380a4193c9
commit 230c75790c
1 changed files with 12 additions and 3 deletions

View File

@ -33,10 +33,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
// Playback controls // Playback controls
// Toggle Pause // Toggle Pause
KeyCode::Char('p') => app.conn.toggle_pause(), KeyCode::Char('p') => {
app.conn.toggle_pause();
app.conn.update_status();
}
// Pause // Pause
KeyCode::Char('s') => app.conn.pause(), KeyCode::Char('s') => {
app.conn.pause();
app.conn.update_status();
}
// Toggle rpeat // Toggle rpeat
KeyCode::Char('r') => { KeyCode::Char('r') => {
@ -51,7 +57,10 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
} }
// Dmenu prompt // Dmenu prompt
KeyCode::Char('D') => app.conn.play_dmenu()?, KeyCode::Char('D') => {
app.conn.play_dmenu()?;
app.conn.update_status();
}
// add to queue // add to queue
KeyCode::Char('a') => app.playlist_popup = true, KeyCode::Char('a') => app.playlist_popup = true,