mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Disable reply actions for local echoes
This commit is contained in:
committed by
Stefan Ceriu
parent
fe656450ef
commit
501c3aed23
@@ -517,8 +517,8 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
|
|
||||||
var actions: [TimelineItemMenuAction] = []
|
var actions: [TimelineItemMenuAction] = []
|
||||||
|
|
||||||
if let messageitem = item as? EventBasedMessageTimelineItemProtocol {
|
if let messageItem = item as? EventBasedMessageTimelineItemProtocol, messageItem.isRemoteMessage {
|
||||||
actions.append(.reply(isThread: messageitem.isThreaded))
|
actions.append(.reply(isThread: messageItem.isThreaded))
|
||||||
actions.append(.forward(itemID: itemID))
|
actions.append(.forward(itemID: itemID))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ extension EventBasedTimelineItemProtocol {
|
|||||||
"\(String(describing: Self.self)): id: \(id), timestamp: \(timestamp), isOutgoing: \(isOutgoing), properties: \(properties)"
|
"\(String(describing: Self.self)): id: \(id), timestamp: \(timestamp), isOutgoing: \(isOutgoing), properties: \(properties)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isRemoteMessage: Bool {
|
||||||
|
id.eventID != nil
|
||||||
|
}
|
||||||
|
|
||||||
var hasFailedToSend: Bool {
|
var hasFailedToSend: Bool {
|
||||||
properties.deliveryStatus == .sendingFailed
|
properties.deliveryStatus == .sendingFailed
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user