mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-07-04 16:11:35 +00:00
feat: switch to new profile on save
This commit is contained in:
parent
f614941e8f
commit
a71359e800
1 changed files with 3 additions and 2 deletions
|
@ -484,14 +484,15 @@ impl SimpleComponent for App {
|
||||||
self.profiles.remove(index);
|
self.profiles.remove(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.profiles.push(prof);
|
self.profiles.push(prof.clone());
|
||||||
self.profiles.sort_unstable_by(|a, b| a.name.cmp(&b.name));
|
self.profiles.sort_unstable_by(|a, b| a.name.cmp(&b.name));
|
||||||
self.config.set_profiles(&self.profiles);
|
self.config.set_profiles(&self.profiles);
|
||||||
|
self.config.selected_profile_uuid = prof.uuid;
|
||||||
self.config.save();
|
self.config.save();
|
||||||
self.main_view.sender().emit(MainViewMsg::UpdateProfiles(
|
self.main_view.sender().emit(MainViewMsg::UpdateProfiles(
|
||||||
self.profiles.clone(),
|
self.profiles.clone(),
|
||||||
self.config.clone(),
|
self.config.clone(),
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
Msg::RunSetCap => {
|
Msg::RunSetCap => {
|
||||||
if !check_dependency(pkexec_dep()) {
|
if !check_dependency(pkexec_dep()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue