make selected accounts non optional

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-06-25 22:09:55 -04:00
parent 9cacb6bb69
commit 8e92a97a57
16 changed files with 136 additions and 196 deletions

View File

@@ -18,7 +18,7 @@ pub struct ThreadView<'a, 'd> {
id_source: egui::Id,
is_muted: &'a MuteFun,
note_context: &'a mut NoteContext<'d>,
cur_acc: &'a Option<KeypairUnowned<'a>>,
cur_acc: &'a KeypairUnowned<'a>,
jobs: &'a mut JobsCache,
}
@@ -30,7 +30,7 @@ impl<'a, 'd> ThreadView<'a, 'd> {
note_options: NoteOptions,
is_muted: &'a MuteFun,
note_context: &'a mut NoteContext<'d>,
cur_acc: &'a Option<KeypairUnowned<'a>>,
cur_acc: &'a KeypairUnowned<'a>,
jobs: &'a mut JobsCache,
) -> Self {
let id_source = egui::Id::new("threadscroll_threadview");
@@ -135,10 +135,9 @@ impl<'a, 'd> ThreadView<'a, 'd> {
}
let zapping_acc = self
.cur_acc
.as_ref()
.filter(|_| self.note_context.current_account_has_wallet)
.or(self.cur_acc.as_ref());
.note_context
.current_account_has_wallet
.then_some(self.cur_acc);
show_notes(
ui,