From bdb3bc0bd7f3df4f238ed89ea3d5254d09db913f Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Sat, 26 Mar 2022 15:08:42 +0400 Subject: [PATCH] mobile: hide edit button (#474) --- .../app/views/chat/item/ChatItemView.kt | 16 ++++++++-------- apps/ios/Shared/Views/Chat/ChatView.swift | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt index c91f159c55..e5cfad3a34 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt @@ -65,14 +65,14 @@ fun ChatItemView( copyText(cxt, cItem.content.text) showMenu = false }) - if (cItem.chatDir.sent && cItem.meta.editable) { - ItemAction("Edit", Icons.Filled.Edit, onClick = { - quotedItem.value = null - editingItem.value = cItem - msg.value = cItem.content.text - showMenu = false - }) - } +// if (cItem.chatDir.sent && cItem.meta.editable) { +// ItemAction("Edit", Icons.Filled.Edit, onClick = { +// quotedItem.value = null +// editingItem.value = cItem +// msg.value = cItem.content.text +// showMenu = false +// }) +// } } } } diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index cac7716dfc..c52a2e2b04 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -44,15 +44,15 @@ struct ChatView: View { Button { UIPasteboard.general.string = ci.content.text } label: { Label("Copy", systemImage: "doc.on.doc") } - if (ci.chatDir.sent && ci.meta.editable) { - Button { - withAnimation { - quotedItem = nil - editingItem = ci - message = ci.content.text - } - } label: { Label("Edit", systemImage: "square.and.pencil") } - } +// if (ci.chatDir.sent && ci.meta.editable) { +// Button { +// withAnimation { +// quotedItem = nil +// editingItem = ci +// message = ci.content.text +// } +// } label: { Label("Edit", systemImage: "square.and.pencil") } +// } } .padding(.horizontal) .frame(maxWidth: maxWidth, maxHeight: .infinity, alignment: alignment)