We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d58436 commit 4e92f80Copy full SHA for 4e92f80
1 file changed
Tool/Sources/SharedUIComponents/CopyButton.swift
@@ -26,18 +26,19 @@ public struct CopyButton: View {
26
}
27
.padding(4)
28
.simultaneousGesture(
29
- TapGesture().onEnded { _ in
30
- withAnimation(.linear(duration: 0.1)) {
31
- isCopied = true
32
- }
33
- copy()
34
- Task {
35
- try await Task.sleep(nanoseconds: 1_000_000_000)
+ TapGesture()
+ .onEnded { _ in
36
withAnimation(.linear(duration: 0.1)) {
37
- isCopied = false
+ isCopied = true
+ }
+ copy()
+ Task {
+ try await Task.sleep(nanoseconds: 1_000_000_000)
+ withAnimation(.linear(duration: 0.1)) {
38
+ isCopied = false
39
40
41
42
)
43
44
0 commit comments