gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 107/204: debug, fix wrong comparison


From: gnunet
Subject: [taler-taler-ios] 107/204: debug, fix wrong comparison
Date: Thu, 05 Dec 2024 23:51:15 +0100

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 476855908a5c62a9eb1fce537ddab2a8ea2e4243
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Nov 8 13:54:26 2024 +0100

    debug, fix wrong comparison
---
 TalerWallet1/Views/HelperViews/TabBarView.swift | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/TabBarView.swift 
b/TalerWallet1/Views/HelperViews/TabBarView.swift
index d4301e2..c6b210a 100644
--- a/TalerWallet1/Views/HelperViews/TabBarView.swift
+++ b/TalerWallet1/Views/HelperViews/TabBarView.swift
@@ -6,8 +6,10 @@
  * @author Marc Stibane
  */
 import SwiftUI
+import SymLog
 
 struct TabBarView: View {
+    private let symLog = SymLogV(0)
     @Binding var selection: Tab
     @Binding var userAction: Int
     @Binding var hidden: Int
@@ -40,11 +42,12 @@ struct TabBarView: View {
                     .offset(offset)
 //                    .opacity(1 - Double(abs(offset.height / 35)))
                     .gesture(
-                        DragGesture()
+                        DragGesture(minimumDistance: 10)
                             .onChanged { gesture in
                                 var trans = gesture.translation
                                 trans.width = .zero
-                                if abs(offset.height) > 30 {
+                                if abs(trans.height) > 30 {
+                                    symLog.log(".onChanged: didDrag 
\(trans.height)")
                                     offset = .zero
                                     didDrag = true
                                     onActionDrag()    // switch to camera
@@ -52,13 +55,17 @@ struct TabBarView: View {
                                         dragged += 1
                                     }
                                 } else {
+                                    symLog.log(".onChanged: \(trans.height)")
                                     offset = trans
                                 }
                             }
-                            .onEnded { _ in
+                            .onEnded { gesture in
+                                var trans = gesture.translation
                                 if didDrag {
+                                    symLog.log(".onEnded: didDrag 
\(trans.height)")
                                     didDrag = false
                                 } else {
+                                    symLog.log(".onActionTab: \(trans.height)")
                                     onActionTab()
                                 }
                                 offset = .zero

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]