Skip to content

Commit 4e92f80

Browse files
committed
Update button
1 parent 8d58436 commit 4e92f80

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

Tool/Sources/SharedUIComponents/CopyButton.swift

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ public struct CopyButton: View {
2626
}
2727
.padding(4)
2828
.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)
29+
TapGesture()
30+
.onEnded { _ in
3631
withAnimation(.linear(duration: 0.1)) {
37-
isCopied = false
32+
isCopied = true
33+
}
34+
copy()
35+
Task {
36+
try await Task.sleep(nanoseconds: 1_000_000_000)
37+
withAnimation(.linear(duration: 0.1)) {
38+
isCopied = false
39+
}
3840
}
3941
}
40-
}
4142
)
4243
}
4344
}

0 commit comments

Comments
 (0)