gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 07/69: Haptics


From: gnunet
Subject: [taler-taler-ios] 07/69: Haptics
Date: Fri, 19 Jan 2024 09:01:40 +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 fdc905df55391794e6115d2afe40291858794243
Author: Marc Stibane <marc@taler.net>
AuthorDate: Wed Dec 13 22:52:43 2023 +0100

    Haptics
---
 TalerWallet1/Views/HelperViews/CopyShare.swift | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/CopyShare.swift 
b/TalerWallet1/Views/HelperViews/CopyShare.swift
index 500759b..7d0ebfb 100644
--- a/TalerWallet1/Views/HelperViews/CopyShare.swift
+++ b/TalerWallet1/Views/HelperViews/CopyShare.swift
@@ -8,12 +8,15 @@ import SymLog
 
 struct CopyButton: View {
     private let symLog = SymLogV(0)
-    @Environment(\.isEnabled) private var isEnabled: Bool
     let textToCopy: String
     let vertical: Bool
 
+    @Environment(\.isEnabled) private var isEnabled: Bool
+    @EnvironmentObject private var controller: Controller
+
     func copyAction() -> Void {
         symLog.log(textToCopy)
+        controller.hapticFeedback(.medium)
         UIPasteboard.general.setValue(textToCopy,
                                       forPasteboardType: 
UTType.plainText.identifier)
     }
@@ -44,12 +47,14 @@ struct CopyButton: View {
 @MainActor
 struct ShareButton: View {
     private let symLog = SymLogV(0)
-    @Environment(\.isEnabled) private var isEnabled: Bool
-
     let textToShare: String
 
+    @Environment(\.isEnabled) private var isEnabled: Bool
+    @EnvironmentObject private var controller: Controller
+
     func shareAction() -> Void {
         symLog.log(textToShare)
+        controller.hapticFeedback(.soft)
         ShareSheet.shareSheet(url: textToShare)
     }
 

-- 
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]