mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 03:55:23 +00:00
feat: loading preview for images
This commit is contained in:
parent
3b0e56971c
commit
1e64f85568
@ -269,8 +269,10 @@ pub fn try_preview(
|
||||
};
|
||||
match ImageReader::open(path).unwrap().decode() {
|
||||
Ok(image) => {
|
||||
debug!("Width: {:}", window_width);
|
||||
|
||||
cache.lock().insert(
|
||||
entry.name.clone(),
|
||||
&meta::loading(&format!("Loading {}", entry.name)),
|
||||
);
|
||||
let image = Image::from_dynamic_image(
|
||||
image,
|
||||
u32::from(window_height),
|
||||
|
Loading…
x
Reference in New Issue
Block a user