update recently used on dialog open
This commit is contained in:
parent
dc5842e5d5
commit
da52e8aa6e
1 changed files with 8 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ use notify_debouncer_full::{
|
||||||
notify::{self, RecommendedWatcher, Watcher},
|
notify::{self, RecommendedWatcher, Watcher},
|
||||||
DebouncedEvent, Debouncer, FileIdMap,
|
DebouncedEvent, Debouncer, FileIdMap,
|
||||||
};
|
};
|
||||||
|
use recently_used_xbel::update_recently_used;
|
||||||
use std::{
|
use std::{
|
||||||
any::TypeId,
|
any::TypeId,
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
|
|
@ -673,6 +674,12 @@ impl Application for App {
|
||||||
if item.selected {
|
if item.selected {
|
||||||
if let Some(path) = &item.path_opt {
|
if let Some(path) = &item.path_opt {
|
||||||
paths.push(path.clone());
|
paths.push(path.clone());
|
||||||
|
let _ = update_recently_used(
|
||||||
|
&path.clone(),
|
||||||
|
App::APP_ID.to_string(),
|
||||||
|
"cosmic-files".to_string(),
|
||||||
|
None,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue