mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-08 12:35:26 +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() {
|
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),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user