explicit state synchronisation (#129)

prevents unnecessary state updates and makes synchronization less error prone
This commit is contained in:
Ferdinand Schober
2024-05-12 00:49:53 +02:00
committed by GitHub
parent 9969f997d3
commit e9738fc024
6 changed files with 91 additions and 134 deletions

View File

@@ -126,12 +126,11 @@ fn build_ui(app: &Application) {
FrontendEvent::Deleted(client) => {
window.delete_client(client);
}
FrontendEvent::Updated(handle, client) => {
window.update_client_config(handle, client);
}
FrontendEvent::StateChange(handle, state) => {
FrontendEvent::State(handle, config, state) => {
window.update_client_config(handle, config);
window.update_client_state(handle, state);
}
FrontendEvent::NoSuchClient(_) => { }
FrontendEvent::Error(e) => {
window.show_toast(e.as_str());
},