fix missing zap button

Changelog-Fixed: Fix missing zap button
Fixes: 397bfce817 ("add `Accounts` to `NoteContext`")
Fixes: https://github.com/damus-io/notedeck/issues/1021
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-23 10:30:35 -07:00
parent 56cbf68ea5
commit ff0428550b
9 changed files with 54 additions and 28 deletions

View File

@@ -514,6 +514,7 @@ fn render_nav_body(
unknown_ids: ctx.unknown_ids,
clipboard: ctx.clipboard,
i18n: ctx.i18n,
global_wallet: ctx.global_wallet,
};
match top {
Route::Timeline(kind) => {

View File

@@ -802,6 +802,7 @@ mod preview {
let mut note_context = NoteContext {
ndb: app.ndb,
accounts: app.accounts,
global_wallet: app.global_wallet,
img_cache: app.img_cache,
note_cache: app.note_cache,
zaps: app.zaps,

View File

@@ -1,6 +1,6 @@
use egui::{vec2, CornerRadius, Layout};
use notedeck::{
get_current_wallet, tr, Accounts, DefaultZapMsats, GlobalWallet, Localization,
get_current_wallet_mut, tr, Accounts, DefaultZapMsats, GlobalWallet, Localization,
NotedeckTextStyle, PendingDefaultZapState, Wallet, WalletError, WalletUIState, ZapWallet,
};
@@ -103,7 +103,7 @@ impl WalletAction {
}
WalletAction::SetDefaultZapSats(new_default) => 's: {
let sats = {
let Some(wallet) = get_current_wallet(accounts, global_wallet) else {
let Some(wallet) = get_current_wallet_mut(accounts, global_wallet) else {
break 's;
};
@@ -138,7 +138,7 @@ impl WalletAction {
global_wallet.save_wallet();
}
WalletAction::EditDefaultZaps => 's: {
let Some(wallet) = get_current_wallet(accounts, global_wallet) else {
let Some(wallet) = get_current_wallet_mut(accounts, global_wallet) else {
break 's;
};