Update dependencies and format
This commit is contained in:
parent
4312179a4d
commit
2e103dd4eb
2 changed files with 271 additions and 250 deletions
499
Cargo.lock
generated
499
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -431,7 +431,10 @@ enum Message {
|
||||||
Surface(cosmic::surface::Action),
|
Surface(cosmic::surface::Action),
|
||||||
#[allow(clippy::enum_variant_names)]
|
#[allow(clippy::enum_variant_names)]
|
||||||
TabMessage(tab::Message),
|
TabMessage(tab::Message),
|
||||||
TabRescan(Location, Option<tab::Item>, Vec<tab::Item>,
|
TabRescan(
|
||||||
|
Location,
|
||||||
|
Option<tab::Item>,
|
||||||
|
Vec<tab::Item>,
|
||||||
Option<Vec<PathBuf>>,
|
Option<Vec<PathBuf>>,
|
||||||
),
|
),
|
||||||
TabView(tab::View),
|
TabView(tab::View),
|
||||||
|
|
@ -664,9 +667,7 @@ impl App {
|
||||||
widget::column::with_children(children).into()
|
widget::column::with_children(children).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rescan_tab(&self,
|
fn rescan_tab(&self, selection_paths: Option<Vec<PathBuf>>) -> Task<Message> {
|
||||||
selection_paths: Option<Vec<PathBuf>>,
|
|
||||||
) -> Task<Message> {
|
|
||||||
let location = self.tab.location.clone();
|
let location = self.tab.location.clone();
|
||||||
let icon_sizes = self.tab.config.icon_sizes;
|
let icon_sizes = self.tab.config.icon_sizes;
|
||||||
let mounter_items = self.mounter_items.clone();
|
let mounter_items = self.mounter_items.clone();
|
||||||
|
|
@ -689,7 +690,12 @@ impl App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cosmic::action::app(Message::TabRescan(location, parent_item_opt, items, selection_paths))
|
cosmic::action::app(Message::TabRescan(
|
||||||
|
location,
|
||||||
|
parent_item_opt,
|
||||||
|
items,
|
||||||
|
selection_paths,
|
||||||
|
))
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
log::warn!("failed to rescan: {}", err);
|
log::warn!("failed to rescan: {}", err);
|
||||||
|
|
@ -1645,7 +1651,10 @@ impl Application for App {
|
||||||
commands.push(self.update(Message::from(action.message())));
|
commands.push(self.update(Message::from(action.message())));
|
||||||
}
|
}
|
||||||
tab::Command::ChangeLocation(_tab_title, _tab_path, selection_paths) => {
|
tab::Command::ChangeLocation(_tab_title, _tab_path, selection_paths) => {
|
||||||
commands.push(Task::batch([self.update_watcher(), self.rescan_tab(selection_paths)]));
|
commands.push(Task::batch([
|
||||||
|
self.update_watcher(),
|
||||||
|
self.rescan_tab(selection_paths),
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
tab::Command::ContextMenu(point_opt, parent_id) => {
|
tab::Command::ContextMenu(point_opt, parent_id) => {
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
|
|
@ -1837,7 +1846,6 @@ impl Application for App {
|
||||||
self.tab.select_paths(selection_paths);
|
self.tab.select_paths(selection_paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Reset focus on location change
|
// Reset focus on location change
|
||||||
if self.search_get().is_some() {
|
if self.search_get().is_some() {
|
||||||
return widget::text_input::focus(self.search_id.clone());
|
return widget::text_input::focus(self.search_id.clone());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue