Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Dec 24, 2024
1 parent 0020f3d commit 27c7079
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions psst-gui/src/ui/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,18 @@ pub fn playable_widget(track: &Track, display: Display) -> impl Widget<PlayRow<A
.with_child(saved)
.padding(theme::grid(1.0))
.link()
.active(|row: &PlayRow<Arc<Track>>, _env: &Env| {
match &row.ctx.nav {
Nav::AlbumDetail(_, Some(target_id)) => *target_id == row.item.id,
_ => {
if row.is_playing {
true
} else if let Some(playable) = &row.ctx.now_playing {
match playable {
Playable::Track(track) => track.id == row.item.id,
_ => false,
}
} else {
false
.active(|row: &PlayRow<Arc<Track>>, _env: &Env| match &row.ctx.nav {
Nav::AlbumDetail(_, Some(target_id)) => *target_id == row.item.id,
_ => {
if row.is_playing {
true
} else if let Some(playable) = &row.ctx.now_playing {
match playable {
Playable::Track(track) => track.id == row.item.id,
_ => false,
}
} else {
false
}
}
})
Expand Down

0 comments on commit 27c7079

Please sign in to comment.