Revert "Display shuffle order"

This reverts commit e68f50ddff.

Will be reintroduced with #1075
This commit is contained in:
Henrik Friedrichsen
2023-03-09 19:26:15 +01:00
parent 45cca123bc
commit 3a460ea4ad
4 changed files with 9 additions and 32 deletions

View File

@@ -43,7 +43,7 @@ pub struct Queue {
/// the raw data only.
pub queue: Arc<RwLock<Vec<Playable>>>,
/// The playback order of the queue, as indices into `self.queue`.
random_order: Arc<RwLock<Option<Vec<usize>>>>,
random_order: RwLock<Option<Vec<usize>>>,
current_track: RwLock<Option<usize>>,
spotify: Spotify,
cfg: Arc<Config>,
@@ -62,7 +62,7 @@ impl Queue {
queue: Arc::new(RwLock::new(queue_state.queue)),
spotify: spotify.clone(),
current_track: RwLock::new(queue_state.current_track),
random_order: Arc::new(RwLock::new(queue_state.random_order)),
random_order: RwLock::new(queue_state.random_order),
cfg,
#[cfg(feature = "notify")]
notification_id: Arc::new(AtomicU32::new(0)),
@@ -442,8 +442,8 @@ impl Queue {
}
/// Get the current order that is used to shuffle.
pub fn get_random_order(&self) -> Arc<RwLock<Option<Vec<usize>>>> {
self.random_order.clone()
pub fn get_random_order(&self) -> Option<Vec<usize>> {
self.random_order.read().unwrap().clone()
}
/// (Re)generate the random shuffle order.