rmptui6338417
fix #1
+7 −3
1 file changed
- M src/ui.rs +7 −3
| @@ -175,9 +175,13 @@ fn draw_queue(frame: &mut Frame, app: &mut App, size: Rect) { | |||
| 175 | 175 | Cell::from(time.to_string().magenta()), | |
| 176 | 176 | ]); | |
| 177 | 177 | ||
| 178 | − | let pos = app.conn.current_song.place.unwrap_or_default().pos; | |
| 179 | − | if i == pos as usize { | |
| 180 | − | row.magenta().bold() | |
| 178 | + | let place = app.conn.current_song.place; | |
| 179 | + | if let Some(pos) = place { | |
| 180 | + | if i == pos.pos as usize { | |
| 181 | + | row.magenta().bold() | |
| 182 | + | } else { | |
| 183 | + | row | |
| 184 | + | } | |
| 181 | 185 | } else { | |
| 182 | 186 | row | |
| 183 | 187 | } | |