Remove ”copy” action for location events (#1355)

* Hide ”copy” action for location events

* Cleanup
This commit is contained in:
Alfonso Grillo 2023-07-18 17:54:42 +02:00 committed by GitHub
parent ad1422ad6c
commit cf39710891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -411,7 +411,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
actions.append(.edit)
}
if item.isMessage {
if item.isMessage, !item.isLocation {
actions.append(.copy)
}

View File

@ -42,6 +42,10 @@ extension EventBasedTimelineItemProtocol {
self is EventBasedMessageTimelineItemProtocol
}
var isLocation: Bool {
self is LocationRoomTimelineItem
}
var isRedacted: Bool {
self is RedactedRoomTimelineItem
}