Hotfix: Fix initialization of mod if Among Us path is known

This commit is contained in:
2022-09-26 19:02:17 -07:00
parent 38c975b44c
commit 686d24f7b5
2 changed files with 12 additions and 3 deletions

View File

@@ -121,10 +121,13 @@ impl AppDelegate<AppData> for Delegate {
fn window_added(
&mut self,
_id: WindowId,
_data: &mut AppData,
data: &mut AppData,
_env: &Env,
_ctx: &mut DelegateCtx,
ctx: &mut DelegateCtx,
) {
if !data.among_us_path.is_empty() {
ctx.submit_command(ATTEMPT_INSTALL);
}
}
fn command(
&mut self,
@@ -228,6 +231,7 @@ impl AppDelegate<AppData> for Delegate {
);
}
}
data.initialized = !data.initialized;
return Handled::Yes;
}