fix(wallpaper): set the category on adding a folder
This commit is contained in:
parent
2be76211e8
commit
2c72c1e5fd
1 changed files with 6 additions and 2 deletions
|
|
@ -142,9 +142,11 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
ActiveDialog::AddFolder => {
|
ActiveDialog::AddFolder => {
|
||||||
if path.is_dir() {
|
if path.is_dir() {
|
||||||
self.add_recent_folder(path.clone());
|
self.add_recent_folder(path.clone());
|
||||||
|
|
||||||
let _res = self.config.set_current_folder(Some(path.clone()));
|
let _res = self.config.set_current_folder(Some(path.clone()));
|
||||||
|
|
||||||
|
let id = self.config.recent_folders().len() - 1;
|
||||||
|
self.categories.selected = Some(Category::RecentFolder(id));
|
||||||
|
|
||||||
return cosmic::command::future(async move {
|
return cosmic::command::future(async move {
|
||||||
crate::pages::Message::DesktopWallpaper(Message::ChangeFolder(
|
crate::pages::Message::DesktopWallpaper(Message::ChangeFolder(
|
||||||
change_folder(path).await,
|
change_folder(path).await,
|
||||||
|
|
@ -166,7 +168,9 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveDialog::None => (),
|
ActiveDialog::None => {
|
||||||
|
tracing::error!("not actively handling a dialog");
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue