Krolyxon
Commit 6338417

rmptui6338417

fix #1

Author
krolxon
Date
2024-05-12 12:35 +0530
Parent
6af7553
Commit
633841700263a055a13a4ba41e9026a1abc5073c

+7 −3

1 file changed

  1. M src/ui.rs +7 −3
M src/ui.rs View
@@ -175,9 +175,13 @@ fn draw_queue(frame: &mut Frame, app: &mut App, size: Rect) {
175175 Cell::from(time.to_string().magenta()),
176176 ]);
177177
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+ }
181185 } else {
182186 row
183187 }