feat: show the shuffle mode beside the queue on the now-playing screen
The hint bar names the mode too, but it can be turned off.
This commit is contained in:
+12
@@ -1782,7 +1782,18 @@ impl App {
|
||||
})
|
||||
}
|
||||
|
||||
fn render_shuffle(&self) {
|
||||
let label = match self.shuffle {
|
||||
_ if self.library.is_some() => "Shuffling the whole library",
|
||||
Mode::Off => "",
|
||||
Mode::Tracks => "Shuffled by track",
|
||||
Mode::Albums => "Shuffled by album",
|
||||
};
|
||||
self.ui.set_np_shuffle(label.into());
|
||||
}
|
||||
|
||||
fn render_hints(&self) {
|
||||
self.render_shuffle();
|
||||
let mut hints = Vec::new();
|
||||
let mut h = |c: Control, l: &str| {
|
||||
let icons = self.hint_icons(c);
|
||||
@@ -2504,6 +2515,7 @@ impl App {
|
||||
}
|
||||
|
||||
fn render_player(&mut self) {
|
||||
self.render_shuffle();
|
||||
let song = self.current.and_then(|i| self.queue.get(i)).cloned();
|
||||
self.ui.set_np_has_track(song.is_some());
|
||||
self.ui.set_np_paused(self.paused);
|
||||
|
||||
Reference in New Issue
Block a user