Skip to content

Commit ec6294b

Browse files
authored
Fix #117 (#118)
* fix: version data not being attached to process manager push * fix: clippy
1 parent 17c375b commit ec6294b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src-tauri/src/process/process_manager.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,23 @@ impl ProcessManager<'_> {
172172
let _ = self.app_handle.emit("launch_external_error", &game_id);
173173
}
174174

175+
// This is too many unwraps for me to be comfortable
176+
let version_data = db_handle
177+
.applications
178+
.game_versions
179+
.get(&game_id)
180+
.unwrap()
181+
.get(&meta.version.unwrap())
182+
.unwrap();
183+
175184
let status = GameStatusManager::fetch_state(&game_id, &db_handle);
176-
drop(db_handle);
177185

178-
push_game_update(&self.app_handle, &game_id, None, status);
186+
push_game_update(
187+
&self.app_handle,
188+
&game_id,
189+
Some(version_data.clone()),
190+
status,
191+
);
179192
}
180193

181194
fn fetch_process_handler(

0 commit comments

Comments
 (0)