mobile: hide edit button (#474)

This commit is contained in:
JRoberts
2022-03-26 15:08:42 +04:00
committed by GitHub
parent 8b2ae2d426
commit bdb3bc0bd7
2 changed files with 17 additions and 17 deletions

View File

@@ -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)