Will change this commit message to mean something later
Some checks failed
dev release / build (push) Failing after 0s

This commit is contained in:
Breadway 2026-07-22 19:52:16 +08:00
parent f3905d8114
commit 8d3f55b607
14 changed files with 1491 additions and 40 deletions

View file

@ -38,6 +38,7 @@ pub enum StateCommand {
},
ClearSubscriptions,
ClearModules,
ClearWidgets,
SetModuleStatus {
name: String,
status: ModuleLoadState,
@ -117,6 +118,10 @@ impl StateHandle {
let _ = self.command_tx.send(StateCommand::ClearModules);
}
pub fn clear_widgets(&self) {
let _ = self.command_tx.send(StateCommand::ClearWidgets);
}
pub fn set_module_status(
&self,
name: String,
@ -290,6 +295,9 @@ async fn handle_command(
StateCommand::ClearModules => {
state.write().await.modules.clear();
}
StateCommand::ClearWidgets => {
state.write().await.widgets.clear();
}
StateCommand::SetModuleStatus {
name,
status,