feat: loading preview for images

This commit is contained in:
azy 2025-02-13 23:02:27 +08:00
parent 3b0e56971c
commit 1e64f85568

View File

@ -269,8 +269,10 @@ pub fn try_preview(
}; };
match ImageReader::open(path).unwrap().decode() { match ImageReader::open(path).unwrap().decode() {
Ok(image) => { Ok(image) => {
debug!("Width: {:}", window_width); cache.lock().insert(
entry.name.clone(),
&meta::loading(&format!("Loading {}", entry.name)),
);
let image = Image::from_dynamic_image( let image = Image::from_dynamic_image(
image, image,
u32::from(window_height), u32::from(window_height),