migrate to using Images instead of MediaCache directly

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-02-18 19:42:17 -05:00
parent 75a352a86f
commit 33fdf647e3
27 changed files with 101 additions and 106 deletions

View File

@@ -3,14 +3,14 @@ use egui::{
Align, Button, Frame, Image, InnerResponse, Layout, RichText, ScrollArea, Ui, UiBuilder, Vec2,
};
use nostrdb::{Ndb, Transaction};
use notedeck::{Accounts, MediaCache};
use notedeck::{Accounts, Images};
use super::profile::preview::SimpleProfilePreview;
pub struct AccountsView<'a> {
ndb: &'a Ndb,
accounts: &'a Accounts,
img_cache: &'a mut MediaCache,
img_cache: &'a mut Images,
}
#[derive(Clone, Debug)]
@@ -27,7 +27,7 @@ enum ProfilePreviewAction {
}
impl<'a> AccountsView<'a> {
pub fn new(ndb: &'a Ndb, accounts: &'a Accounts, img_cache: &'a mut MediaCache) -> Self {
pub fn new(ndb: &'a Ndb, accounts: &'a Accounts, img_cache: &'a mut Images) -> Self {
AccountsView {
ndb,
accounts,
@@ -54,7 +54,7 @@ impl<'a> AccountsView<'a> {
ui: &mut Ui,
accounts: &Accounts,
ndb: &Ndb,
img_cache: &mut MediaCache,
img_cache: &mut Images,
) -> Option<AccountsViewResponse> {
let mut return_op: Option<AccountsViewResponse> = None;
ui.allocate_ui_with_layout(