fix(dtmm): Prevent logging from causing state changes
The log view itself still works correctly, as it is lensed onto the field. But ignoring log from general Data comparisons prevents it generating state changes. This also removes the log for unknown commands. In practice, missing to implement a command hasn't been an issue.
This commit is contained in:
parent
8705c3b9ac
commit
272f4ef016
2 changed files with 3 additions and 6 deletions
|
@ -155,6 +155,8 @@ pub(crate) struct State {
|
|||
pub game_dir: Arc<PathBuf>,
|
||||
pub data_dir: Arc<PathBuf>,
|
||||
pub nexus_api_key: Arc<String>,
|
||||
|
||||
#[data(ignore)]
|
||||
pub log: Arc<String>,
|
||||
|
||||
#[lens(ignore)]
|
||||
|
|
|
@ -354,12 +354,7 @@ impl AppDelegate<State> for Delegate {
|
|||
state.is_update_in_progress = false;
|
||||
Handled::Yes
|
||||
}
|
||||
cmd => {
|
||||
if cfg!(debug_assertions) {
|
||||
tracing::warn!("Unknown command: {:?}", cmd);
|
||||
}
|
||||
Handled::No
|
||||
}
|
||||
_ => Handled::No,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue