mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-11 05:51:28 +03:00
explicit state synchronisation (#129)
prevents unnecessary state updates and makes synchronization less error prone
This commit is contained in:
committed by
GitHub
parent
9969f997d3
commit
e9738fc024
@@ -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());
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user