rmptui51fbf42
fix >/< keybinds
+6 −2
1 file changed
- M src/handler.rs +6 −2
| @@ -275,12 +275,16 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> { | |||
| 275 | 275 | ||
| 276 | 276 | // Play next song | |
| 277 | 277 | KeyCode::Char('>') => { | |
| 278 | − | app.conn.conn.next()?; | |
| 278 | + | if !app.queue_list.list.is_empty() { | |
| 279 | + | app.conn.conn.next()?; | |
| 280 | + | } | |
| 279 | 281 | } | |
| 280 | 282 | ||
| 281 | 283 | // Play previous song | |
| 282 | 284 | KeyCode::Char('<') => { | |
| 283 | − | app.conn.conn.prev()?; | |
| 285 | + | if !app.queue_list.list.is_empty() { | |
| 286 | + | app.conn.conn.prev()?; | |
| 287 | + | } | |
| 284 | 288 | } | |
| 285 | 289 | ||
| 286 | 290 | // Volume controls | |