aboutsummaryrefslogtreecommitdiff
path: root/src/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.rs')
-rwxr-xr-xsrc/ui.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui.rs b/src/ui.rs
index e21362d..fbc57a3 100755
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -175,9 +175,13 @@ fn draw_queue(frame: &mut Frame, app: &mut App, size: Rect) {
Cell::from(time.to_string().magenta()),
]);
- let pos = app.conn.current_song.place.unwrap_or_default().pos;
- if i == pos as usize {
- row.magenta().bold()
+ let place = app.conn.current_song.place;
+ if let Some(pos) = place {
+ if i == pos.pos as usize {
+ row.magenta().bold()
+ } else {
+ row
+ }
} else {
row
}