properties_view: Add comment explaining the purpose of build_dimensions()

Sophie Herold mentioned that it's not entirely clear why we're
loading the image data again here. This comment should explain why
to future readers.
This commit is contained in:
Christopher Davis 2022-11-22 18:06:20 -05:00 • committed by Sophie Herold
parent e48517d646
commit 94086b1650

View file

@ -233,6 +233,11 @@ impl LpPropertiesView {
self.notify("file-info"); self.notify("file-info");
} }
// Determines the dimensions of the file asyncronously. We do this
// asycnhronously to avoid blocking the UI as we parse the file info.
// In addition, we're loading the image metadata separately from the file
// here so that the properties sidebar's information can load separately
// from the current file.
fn build_dimensions(&self, info: &gio::FileInfo, file: &gio::File) { fn build_dimensions(&self, info: &gio::FileInfo, file: &gio::File) {
let imp = self.imp(); let imp = self.imp();