nozaps: switch to global sheet when zapping

This fixes many popping bugs

Changelog-Fixed: Fix zap sheet popping
This commit is contained in:
William Casarin
2023-06-23 11:50:55 +02:00
parent 61b3ad2990
commit f090596067
11 changed files with 80 additions and 87 deletions

View File

@@ -37,7 +37,7 @@ struct InvoiceView: View {
var PayButton: some View {
Button {
if settings.show_wallet_selector {
showing_select_wallet = true
present_sheet(.select_wallet(invoice: invoice.string))
} else {
open_with_wallet(wallet: settings.default_wallet.model, invoice: invoice.string)
}
@@ -79,9 +79,6 @@ struct InvoiceView: View {
}
.padding(30)
}
.sheet(isPresented: $showing_select_wallet, onDismiss: {showing_select_wallet = false}) {
SelectWalletView(default_wallet: settings.default_wallet, showingSelectWallet: $showing_select_wallet, our_pubkey: our_pubkey, invoice: invoice.string)
}
}
}
@@ -116,3 +113,7 @@ struct InvoiceView_Previews: PreviewProvider {
}
}
func present_sheet(_ sheet: Sheets) {
notify(.present_sheet, sheet)
}