[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 32/54: Adjust DebugView for Notch
From: |
gnunet |
Subject: |
[taler-taler-ios] 32/54: Adjust DebugView for Notch |
Date: |
Fri, 30 Jun 2023 22:34:04 +0200 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit 536564ce7d487e1490f50b5633afa75a78c7f16e
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Jun 27 22:27:13 2023 +0200
Adjust DebugView for Notch
---
TalerWallet1/Controllers/DebugViewC.swift | 11 ++++++++++-
TalerWallet1/Views/Sheets/Sheet.swift | 14 ++++++--------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/TalerWallet1/Controllers/DebugViewC.swift
b/TalerWallet1/Controllers/DebugViewC.swift
index 43dcc32..d5139f6 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -90,7 +90,12 @@ public let SHEET_RCV_P2P_ACCEPT = SHEET_RCV_P2P_TOS + 1
// 172 Recei
//public let SHEET_REFUND =
-
+extension UIDevice {
+ var hasNotch: Bool {
+ let bottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
+ return bottom > 0
+ }
+}
// MARK: -
struct DebugViewV: View {
private let symLog = SymLogV(0)
@@ -106,6 +111,10 @@ struct DebugViewV: View {
HStack {
Spacer()
Spacer()
+ if UIDevice.current.hasNotch {
+ Spacer()
+ Spacer()
+ }
Text(viewIDString)
.font(.caption2)
.foregroundColor(.red)
diff --git a/TalerWallet1/Views/Sheets/Sheet.swift
b/TalerWallet1/Views/Sheets/Sheet.swift
index e2e8a9a..43b1895 100644
--- a/TalerWallet1/Views/Sheets/Sheet.swift
+++ b/TalerWallet1/Views/Sheets/Sheet.swift
@@ -4,6 +4,7 @@
*/
import SwiftUI
import SymLog
+import os.log
struct Sheet: View {
private let symLog = SymLogV()
@@ -12,15 +13,18 @@ struct Sheet: View {
var sheetView: AnyView
+ let logger = Logger (subsystem: "net.taler.gnu", category: "Sheet")
+
var cancelButton: some View {
Button("Cancel") {
- print(dismiss) // TODO: delete this line
+ logger.log("Cancel")
dismissTop()
}
}
var body: some View {
- let idString = debugViewC.sheetID > 0 ? String(debugViewC.sheetID) : ""
+ let idString = debugViewC.sheetID > 0 ? String(debugViewC.sheetID)
+ : "" // show nothing if 0
NavigationView {
sheetView
.navigationBarItems(leading: cancelButton)
@@ -36,9 +40,3 @@ struct Sheet: View {
}
}
}
-// MARK: -
-//struct Sheet_Previews: PreviewProvider {
-// static var previews: some View {
-//
-// }
-//}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 15/54: Suspend-Resume, (continued)
- [taler-taler-ios] 15/54: Suspend-Resume, gnunet, 2023/06/30
- [taler-taler-ios] 21/54: Sounds, P2P receive, gnunet, 2023/06/30
- [taler-taler-ios] 07/54: Big Model update, removed unneccessary thread-safety code, gnunet, 2023/06/30
- [taler-taler-ios] 41/54: playSound, gnunet, 2023/06/30
- [taler-taler-ios] 30/54: bugfix, gnunet, 2023/06/30
- [taler-taler-ios] 43/54: confirmTransferUrl, gnunet, 2023/06/30
- [taler-taler-ios] 33/54: log only release builds, gnunet, 2023/06/30
- [taler-taler-ios] 27/54: Logging, gnunet, 2023/06/30
- [taler-taler-ios] 38/54: actions, gnunet, 2023/06/30
- [taler-taler-ios] 28/54: playSound, gnunet, 2023/06/30
- [taler-taler-ios] 32/54: Adjust DebugView for Notch,
gnunet <=
- [taler-taler-ios] 20/54: viewID + comments, gnunet, 2023/06/30
- [taler-taler-ios] 31/54: bump Testflight version, gnunet, 2023/06/30
- [taler-taler-ios] 37/54: Decodable, gnunet, 2023/06/30
- [taler-taler-ios] 29/54: Model cleanup, gnunet, 2023/06/30
- [taler-taler-ios] 36/54: playSound, gnunet, 2023/06/30
- [taler-taler-ios] 44/54: BalanceReloaded, gnunet, 2023/06/30
- [taler-taler-ios] 35/54: developerMode, gnunet, 2023/06/30
- [taler-taler-ios] 45/54: TransactionDetails, gnunet, 2023/06/30
- [taler-taler-ios] 39/54: Scrollview, gnunet, 2023/06/30
- [taler-taler-ios] 25/54: failTransaction, gnunet, 2023/06/30