исправлена ошибка message.text->meesage.body #13
iOS CI / Build and Test SwiftUI App (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build Unsigned iOS IPA (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build macOS ZIP (push) Canceled after 0s

This commit is contained in:
wt
2026-08-28 15:17:52 +07:00
parent 4c16644b69
commit afa1958ac5
@@ -72,14 +72,7 @@ struct MessageBubble: View {
}
}
if message.hasText {
Button(action: {
#if os(macOS)
NSPasteboard.general.clearContents()
NSPasteboard.general.setString(message.text, forType: .string)
#else
UIPasteboard.general.string = message.text
#endif
}) {
Button(action: copyText(message.body)) {
Label("Копировать текст", systemImage: "doc.on.doc")
}
}
@@ -117,6 +110,15 @@ struct MessageBubble: View {
}
}
private func copyText(body: String) {
#if os(macOS)
NSPasteboard.general.clearContents()
NSPasteboard.general.setString(message.body, forType: .string)
#else
UIPasteboard.general.string = message.body
#endif
}
private var messageContainer: some View {
HStack(spacing: 2) {
if isSelectionMode {