notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit b421e7e45faeff6bddf99a6cc4104c1adcf1067a
parent ccc188c0aec93afbeb5686f4021bcfd9ad44d914
Author: kernelkind <kernelkind@gmail.com>
Date:   Thu, 14 Aug 2025 18:29:23 -0400

make `TimelineCache::notes` private

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Mcrates/notedeck_columns/src/timeline/cache.rs | 2+-
Mcrates/notedeck_columns/src/ui/profile/mod.rs | 16+++++++---------
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/crates/notedeck_columns/src/timeline/cache.rs b/crates/notedeck_columns/src/timeline/cache.rs @@ -113,7 +113,7 @@ impl TimelineCache { } /// Get and/or update the notes associated with this timeline - pub fn notes<'a>( + fn notes<'a>( &'a mut self, ndb: &Ndb, note_cache: &mut NoteCache, diff --git a/crates/notedeck_columns/src/ui/profile/mod.rs b/crates/notedeck_columns/src/ui/profile/mod.rs @@ -73,7 +73,7 @@ impl<'a, 'd> ProfileView<'a, 'd> { scroll_area = scroll_area.vertical_scroll_offset(offset); } - let output = scroll_area.show(ui, |ui| { + let output = scroll_area.show(ui, |ui| 's: { let mut action = None; let txn = Transaction::new(self.note_context.ndb).expect("txn"); let profile = self @@ -85,15 +85,13 @@ impl<'a, 'd> ProfileView<'a, 'd> { if let Some(profile_view_action) = self.profile_body(ui, profile.as_ref()) { action = Some(profile_view_action); } - let profile_timeline = self + + let Some(profile_timeline) = self .timeline_cache - .notes( - self.note_context.ndb, - self.note_context.note_cache, - &txn, - &TimelineKind::Profile(*self.pubkey), - ) - .get_ptr(); + .get_mut(&TimelineKind::Profile(*self.pubkey)) + else { + break 's action; + }; profile_timeline.selected_view = tabs_ui( ui,