add Accounts to NoteContext

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-07-14 20:42:09 -04:00
parent e2295172a2
commit 397bfce817
13 changed files with 69 additions and 166 deletions

View File

@@ -424,8 +424,10 @@ fn render_nav_body(
col: usize,
inner_rect: egui::Rect,
) -> Option<RenderNavAction> {
let current_account_has_wallet = get_current_wallet(ctx.accounts, ctx.global_wallet).is_some();
let mut note_context = NoteContext {
ndb: ctx.ndb,
accounts: ctx.accounts,
img_cache: ctx.img_cache,
note_cache: ctx.note_cache,
zaps: ctx.zaps,
@@ -433,12 +435,11 @@ fn render_nav_body(
job_pool: ctx.job_pool,
unknown_ids: ctx.unknown_ids,
clipboard: ctx.clipboard,
current_account_has_wallet: get_current_wallet(ctx.accounts, ctx.global_wallet).is_some(),
current_account_has_wallet,
};
match top {
Route::Timeline(kind) => render_timeline_route(
&mut app.timeline_cache,
ctx.accounts,
kind,
col,
app.note_options,
@@ -449,7 +450,6 @@ fn render_nav_body(
),
Route::Thread(selection) => render_thread_route(
&mut app.threads,
ctx.accounts,
selection,
col,
app.note_options,
@@ -602,7 +602,6 @@ fn render_nav_body(
app.note_options,
search_buffer,
&mut note_context,
&(&ctx.accounts.get_selected_account().key).into(),
&mut app.jobs,
)
.show(ui)