Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions cosmic-settings/src/pages/desktop/wallpaper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ pub enum Message {
CacheDisplayImage,
/// Selects an option in the category dropdown menu.
ChangeCategory(Category),
/// Changes the displayed images in the wallpaper view.
ChangeFolder(Context),
/// Emits a wallpaper event.
Event(WallpaperEvent),
/// Handles messages from the color dialog.
Expand Down Expand Up @@ -696,27 +694,6 @@ impl Page {

Message::CacheDisplayImage => self.cache_display_image(),

Message::ChangeFolder(mut context) => {
// Reassign custom colors and images to the new context.
std::mem::swap(&mut context, &mut self.selection);

for color in context.custom_colors {
self.selection.add_custom_color(color);
}

for image in context.custom_images {
let path = context.paths.remove(image);
let display = context.display_images.remove(image);
let selection = context.selection_handles.remove(image);

if let Some(((display, selection), path)) = display.zip(selection).zip(path) {
self.selection.add_custom_image(path, display, selection);
}
}

self.select_first_wallpaper();
}

Message::ColorAdd(message) => {
match message {
ColorPickerUpdate::ActionFinished => {
Expand Down