commit b45a8930b1a5defd12dfc0861f5b1f0678425fed
parent 5474613f1376fdf7103bfe751f35fa72066fccad
Author: kernelkind <kernelkind@gmail.com>
Date: Sat, 22 Nov 2025 21:07:29 -0700
tmp(refactor): TexturesCache -> TexturesCacheOld
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/crates/notedeck/src/imgcache.rs b/crates/notedeck/src/imgcache.rs
@@ -26,11 +26,11 @@ use std::path::{self, Path};
use tracing::warn;
#[derive(Default)]
-pub struct TexturesCache {
+pub struct TexturesCacheOld {
pub cache: hashbrown::HashMap<String, TextureStateInternal>,
}
-impl TexturesCache {
+impl TexturesCacheOld {
pub fn handle_and_get_or_insert_loadable(
&mut self,
url: &str,
@@ -269,7 +269,7 @@ pub struct ImageFrame {
pub struct MediaCache {
pub cache_dir: path::PathBuf,
- pub textures_cache: TexturesCache,
+ pub textures_cache: TexturesCacheOld,
pub cache_type: MediaCacheType,
pub cache_size: Arc<Mutex<Option<u64>>>,
}
@@ -303,7 +303,7 @@ impl MediaCache {
Self {
cache_dir,
- textures_cache: TexturesCache::default(),
+ textures_cache: TexturesCacheOld::default(),
cache_type,
cache_size,
}
diff --git a/crates/notedeck/src/lib.rs b/crates/notedeck/src/lib.rs
@@ -56,7 +56,7 @@ pub use i18n::{CacheStats, FluentArgs, FluentValue, LanguageIdentifier, Localiza
pub use imgcache::{
get_render_state, Animation, AnimationOld, GifState, GifStateMap, ImageFrame, Images,
LatestTexture, LoadableTextureState, MediaCache, MediaCacheType, RenderState, TextureFrame,
- TextureState, TextureStateOld, TexturedImage, TexturesCache,
+ TextureState, TextureStateOld, TexturedImage, TexturesCacheOld,
};
pub use jobs::{
BlurhashParams, Job, JobError, JobIdOld, JobParams, JobParamsOwned, JobPool, JobState,
diff --git a/crates/notedeck/src/media/gif.rs b/crates/notedeck/src/media/gif.rs
@@ -18,7 +18,7 @@ use crate::{
AnimationOld, Error, ImageFrame, ImageType, MediaCache, TextureFrame, TextureState,
};
use crate::{media::AnimationMode, Animation};
-use crate::{GifState, GifStateMap, TextureStateOld, TexturedImage, TexturesCache};
+use crate::{GifState, GifStateMap, TextureStateOld, TexturedImage, TexturesCacheOld};
use egui::{ColorImage, TextureHandle};
use image::{codecs::gif::GifDecoder, AnimationDecoder, DynamicImage, Frame};
use std::time::Duration;
@@ -27,7 +27,7 @@ pub fn ensure_latest_texture_from_cache(
ui: &egui::Ui,
url: &str,
gifs: &mut GifStateMap,
- textures: &mut TexturesCache,
+ textures: &mut TexturesCacheOld,
animation_mode: AnimationMode,
) -> Option<TextureHandle> {
let tstate = textures.cache.get_mut(url)?;
diff --git a/crates/notedeck_ui/src/note/media.rs b/crates/notedeck_ui/src/note/media.rs
@@ -9,7 +9,7 @@ use notedeck::{
compute_blurhash, fonts::get_font_size, show_one_error_message, tr, BlurhashParams,
GifStateMap, Images, Job, JobIdOld, JobParams, JobPool, JobState, JobsCacheOld, Localization,
MediaAction, MediaCacheType, NotedeckTextStyle, ObfuscationType, PointDimensions,
- RenderableMedia, TexturedImage, TexturesCache,
+ RenderableMedia, TexturedImage, TexturesCacheOld,
};
use crate::NoteOptions;
@@ -245,7 +245,7 @@ pub fn get_content_media_render_state<'a>(
jobs: &'a mut JobsCacheOld,
media_trusted: bool,
size: Vec2,
- cache: &'a mut TexturesCache,
+ cache: &'a mut TexturesCacheOld,
url: &'a str,
cache_type: MediaCacheType,
cache_dir: &Path,