Global is default mode
This commit is contained in:
+1
-1
@@ -277,7 +277,7 @@ pub async fn run(
|
||||
library_network_refreshing: Arc::new(std::sync::atomic::AtomicBool::new(false)),
|
||||
library_network_cursors: Arc::new(std::sync::Mutex::new(std::collections::HashMap::new())),
|
||||
library_network_done: Arc::new(std::sync::Mutex::new(std::collections::HashSet::new())),
|
||||
library_network_mode: crate::config::settings::LibrarySourceMode::Local,
|
||||
library_network_mode: state.global.filters.source_mode,
|
||||
library_network_art_fetching: Arc::new(std::sync::atomic::AtomicBool::new(false)),
|
||||
library_network_art_attempted: Arc::new(std::sync::Mutex::new(
|
||||
std::collections::HashSet::new(),
|
||||
|
||||
@@ -158,25 +158,25 @@ fn source_mode_cycles_on_library_playlists_and_queue_tabs() {
|
||||
update(&mut state, Action::CycleSourceMode),
|
||||
Some(Effect::SourceModeChanged)
|
||||
);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::My);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Local);
|
||||
|
||||
state.active_tab = Tab::Playlists;
|
||||
assert_eq!(
|
||||
update(&mut state, Action::CycleSourceMode),
|
||||
Some(Effect::SourceModeChanged)
|
||||
);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Global);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::My);
|
||||
|
||||
state.active_tab = Tab::Queue;
|
||||
assert_eq!(
|
||||
update(&mut state, Action::CycleSourceMode),
|
||||
Some(Effect::SourceModeChanged)
|
||||
);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Local);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Global);
|
||||
|
||||
state.active_tab = Tab::Federation;
|
||||
assert_eq!(update(&mut state, Action::CycleSourceMode), None);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Local);
|
||||
assert_eq!(state.global.filters.source_mode, LibrarySourceMode::Global);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user