Use TexturedImage in MediaCache

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-02-19 17:39:46 -05:00
parent 4f4a0feb8c
commit 594ea0b42d
6 changed files with 61 additions and 34 deletions

View File

@@ -13,9 +13,13 @@ use std::path;
use std::path::PathBuf;
use tracing::warn;
pub type MediaCacheValue = Promise<Result<TextureHandle>>;
pub type MediaCacheValue = Promise<Result<TexturedImage>>;
pub type MediaCacheMap = HashMap<String, MediaCacheValue>;
pub enum TexturedImage {
Static(TextureHandle),
}
pub struct MediaCache {
pub cache_dir: path::PathBuf,
url_imgs: MediaCacheMap,

View File

@@ -31,7 +31,7 @@ pub use context::AppContext;
pub use error::{Error, FilterError};
pub use filter::{FilterState, FilterStates, UnifiedSubscription};
pub use fonts::NamedFontFamily;
pub use imgcache::MediaCache;
pub use imgcache::{MediaCache, TexturedImage};
pub use muted::{MuteFun, Muted};
pub use note::{NoteRef, RootIdError, RootNoteId, RootNoteIdBuf};
pub use notecache::{CachedNote, NoteCache};