mirror of
https://github.com/WarrenHood/MCModpackManager.git
synced 2025-04-29 14:05:00 +01:00
Load profile for edit profile view
This commit is contained in:
parent
9747a41ed2
commit
276e16857c
|
@ -134,7 +134,20 @@ impl Application for ManagerGUI {
|
|||
}
|
||||
};
|
||||
}
|
||||
// TODO: Load profile for EditProfile
|
||||
ManagerView::EditProfile { profile } => {
|
||||
let loaded_profile = self.userdata.get_profile(profile);
|
||||
self.profile_edit_settings.name = profile.trim().into();
|
||||
if let Some(loaded_profile) = loaded_profile {
|
||||
self.profile_edit_settings.name = profile.into();
|
||||
self.profile_edit_settings.mods_dir =
|
||||
Some(loaded_profile.mods_folder.clone());
|
||||
self.profile_edit_settings.pack_source =
|
||||
loaded_profile.pack_source.to_string();
|
||||
self.profile_edit_settings.side = loaded_profile.side;
|
||||
} else {
|
||||
eprintln!("Failed to load existing profile data for {profile}");
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
self.current_view = view;
|
||||
|
|
Loading…
Reference in a new issue