commit 797762e7d25478fd94c6ffbee40b154845f3b62e
parent a2866ff6b3b099519df40c5c3a8cdd33f6bc21f0
Author: William Casarin <jb55@jb55.com>
Date: Thu, 22 Jun 2023 10:17:40 +0200
view/refactor: move sheet handler in CustomizeZapView
Diffstat:
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/damus/Views/Zaps/CustomizeZapView.swift b/damus/Views/Zaps/CustomizeZapView.swift
@@ -241,10 +241,19 @@ struct CustomizeZapView: View {
case .sent_from_nwc:
dismiss()
}
-}
+ }
var body: some View {
MainContent
+ .sheet(isPresented: $show_zap_types) {
+ if #available(iOS 16.0, *) {
+ ZapPicker
+ .presentationDetents([.medium])
+ .presentationDragIndicator(.visible)
+ } else {
+ ZapPicker
+ }
+ }
.sheet(isPresented: $showing_wallet_selector) {
SelectWalletView(default_wallet: state.settings.default_wallet, showingSelectWallet: $showing_wallet_selector, our_pubkey: state.pubkey, invoice: invoice)
}
@@ -303,15 +312,6 @@ struct CustomizeZapView: View {
Spacer()
}
- .sheet(isPresented: $show_zap_types) {
- if #available(iOS 16.0, *) {
- ZapPicker
- .presentationDetents([.medium])
- .presentationDragIndicator(.visible)
- } else {
- ZapPicker
- }
- }
}
var ZapPicker: some View {