image: File doesn't have to be a property anymore
This commit is contained in:
parent
33bcd4a7ac
commit
cfed1d3d63
2 changed files with 5 additions and 6 deletions
|
|
@ -113,7 +113,6 @@ mod imp {
|
|||
#[derive(Debug, Default, Properties)]
|
||||
#[properties(wrapper_type = super::LpImage)]
|
||||
pub struct LpImage {
|
||||
#[property(get, explicit_notify)]
|
||||
pub(super) file: RefCell<Option<gio::File>>,
|
||||
#[property(get)]
|
||||
pub(super) is_deleted: Cell<bool>,
|
||||
|
|
@ -834,8 +833,6 @@ impl LpImage {
|
|||
imp.file.replace(Some(file.clone()));
|
||||
self.reload_file_info().await;
|
||||
self.setup_file_monitor().await;
|
||||
|
||||
self.notify_file();
|
||||
}
|
||||
|
||||
/// Set filename after filename changed
|
||||
|
|
@ -854,8 +851,6 @@ impl LpImage {
|
|||
}
|
||||
|
||||
self.setup_file_monitor().await;
|
||||
|
||||
self.notify_file();
|
||||
}
|
||||
|
||||
async fn reload_file_info(&self) {
|
||||
|
|
@ -1860,6 +1855,10 @@ impl LpImage {
|
|||
.ok()?
|
||||
}
|
||||
|
||||
pub fn file(&self) -> Option<gio::File> {
|
||||
self.imp().file.borrow().clone()
|
||||
}
|
||||
|
||||
pub fn metadata(&self) -> impl Deref<Target = Metadata> + '_ {
|
||||
self.imp().metadata.borrow()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ mod imp {
|
|||
// Dates
|
||||
let has_dates = [
|
||||
Self::update_row(&self.file_created, metadata.file_created()),
|
||||
Self::update_row(&self.file_modified, dbg!(metadata.file_modified())),
|
||||
Self::update_row(&self.file_modified, metadata.file_modified()),
|
||||
]
|
||||
.into_iter()
|
||||
.any(|x| x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue