Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaedus committed Jun 3, 2023
1 parent 2c5df0b commit 63463ad
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/app/components/details/details_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,38 +260,6 @@ impl PlaylistModel for DetailsModel {
menu.append(Some(&*labels::ADD_TO_QUEUE), Some("song.queue"));
Some(menu.upcast())
}

fn autoscroll_to_playing(&self) -> bool {
true
}

fn is_selection_enabled(&self) -> bool {
self.selection()
.map(|s| s.is_selection_enabled())
.unwrap_or(false)
}

fn song_state(&self, id: &str) -> SongState {
let is_playing = self.current_song_id().map(|s| s.eq(id)).unwrap_or(false);
let is_selected = self
.selection()
.map(|s| s.is_song_selected(id))
.unwrap_or(false);
SongState {
is_selected,
is_playing,
}
}

fn toggle_select(&self, id: &str) {
if let Some(selection) = self.selection() {
if selection.is_song_selected(id) {
self.deselect_song(id)
} else {
self.select_song(id);
}
}
}
}

impl SimpleHeaderBarModel for DetailsModel {
Expand Down

0 comments on commit 63463ad

Please sign in to comment.