Connected Devices: added remote control

This commit is contained in:
Ultradesu
2026-07-24 04:11:01 +03:00
parent a737456daf
commit 9352b493a1
12 changed files with 1349 additions and 34 deletions
+7 -1
View File
@@ -44,6 +44,8 @@ pub enum Effect {
restart_paused: Option<bool>,
stop: bool,
},
/// Queue/options changed without a direct audio engine action.
PlaybackQueueChanged,
/// Persist the federation settings and start/stop the node.
FedApplySettings,
/// Force an immediate library publish into the DHT.
@@ -102,6 +104,10 @@ pub fn update(state: &mut AppState, action: Action) -> Option<Effect> {
state.help_visible = !state.help_visible;
None
}
Action::OpenConnectedDevices => {
state.popup = Some(super::state::Popup::ConnectedDevices { cursor: 0 });
None
}
Action::NextTab => {
switch_tab(state, state.active_tab.next());
None
@@ -642,7 +648,7 @@ fn delete_selected(state: &mut AppState) -> Option<Effect> {
}
}
if state.active_tab != Tab::Global {
return None;
return Some(Effect::PlaybackQueueChanged);
}
if state.global.stack.is_empty() {
let artist = state.global.artists.get(state.global.selected).cloned()?;