diff --git a/src/ui/main_ui.rs b/src/ui/main_ui.rs index 04cd3de..165b696 100644 --- a/src/ui/main_ui.rs +++ b/src/ui/main_ui.rs @@ -183,8 +183,8 @@ impl<'a> MainUI<'static> { { let ftable_lock = fv.read().await; if let Some(i) = ftable_lock.state.selected() { - let files_lock = ftable_lock.file_index.file_id_map.read().await; - let fdata = files_lock.get(&(i as u64)).unwrap(); + let files_lock = ftable_lock.file_index.files_sorted.read().await; + let fdata = files_lock.get(i).unwrap(); let lf_lock = fdata.local_file.read().await; game = lf_lock.game.clone(); mod_id = lf_lock.mod_id;