switch to TimelineCache

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-01-19 12:42:41 -08:00
parent e52ba5937f
commit 4b542c0a74
19 changed files with 720 additions and 673 deletions

View File

@@ -2,10 +2,8 @@ use crate::{
column::Columns,
draft::Drafts,
nav::RenderNavAction,
notes_holder::NotesHolderStorage,
profile::{Profile, ProfileAction},
thread::Thread,
timeline::{TimelineId, TimelineKind},
profile::ProfileAction,
timeline::{TimelineCache, TimelineId, TimelineKind},
ui::{
self,
note::{NoteOptions, QuoteRepostView},
@@ -34,8 +32,7 @@ pub fn render_timeline_route(
img_cache: &mut ImageCache,
unknown_ids: &mut UnknownIds,
note_cache: &mut NoteCache,
threads: &mut NotesHolderStorage<Thread>,
profiles: &mut NotesHolderStorage<Profile>,
timeline_cache: &mut TimelineCache,
accounts: &mut Accounts,
route: TimelineRoute,
col: usize,
@@ -71,7 +68,7 @@ pub fn render_timeline_route(
}
TimelineRoute::Thread(id) => ui::ThreadView::new(
threads,
timeline_cache,
ndb,
note_cache,
unknown_ids,
@@ -121,9 +118,10 @@ pub fn render_timeline_route(
&pubkey,
accounts,
ndb,
profiles,
timeline_cache,
img_cache,
note_cache,
unknown_ids,
col,
ui,
&accounts.mutefun(),
@@ -160,9 +158,10 @@ pub fn render_profile_route(
pubkey: &Pubkey,
accounts: &Accounts,
ndb: &Ndb,
profiles: &mut NotesHolderStorage<Profile>,
timeline_cache: &mut TimelineCache,
img_cache: &mut ImageCache,
note_cache: &mut NoteCache,
unknown_ids: &mut UnknownIds,
col: usize,
ui: &mut egui::Ui,
is_muted: &MuteFun,
@@ -171,10 +170,11 @@ pub fn render_profile_route(
pubkey,
accounts,
col,
profiles,
timeline_cache,
ndb,
note_cache,
img_cache,
unknown_ids,
is_muted,
NoteOptions::default(),
)