ui/carousel: refactor to use indices

This refactors our carousel control a bit, it was getting
messy

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-10 12:09:30 -07:00
parent e97574fcdc
commit 41053dd5a5
4 changed files with 147 additions and 133 deletions

View File

@@ -4,6 +4,7 @@ use nostrdb::Note;
use crate::jobs::{Job, JobError, JobParamsOwned};
#[derive(Clone)]
pub struct Blur<'a> {
pub blurhash: &'a str,
pub dimensions: Option<PixelDimensions>, // width and height in pixels
@@ -145,8 +146,9 @@ fn find_blur(tag_iter: nostrdb::TagIter) -> Option<(&str, Blur)> {
))
}
#[derive(Clone)]
pub enum ObfuscationType<'a> {
Blurhash(&'a Blur<'a>),
Blurhash(Blur<'a>),
Default,
}