mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-31 09:46:03 +00:00
mobile: hide edit button (#474)
This commit is contained in:
@@ -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
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user