mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
Redaction reason (#6098)
This commit is contained in:
@@ -198,6 +198,10 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
timelineInteractionHandler.displayTimelineItemActionMenu(for: itemID)
|
||||
case .handleTimelineItemMenuAction(let itemID, let action):
|
||||
timelineInteractionHandler.handleTimelineItemMenuAction(action, itemID: itemID)
|
||||
case .redactConfirmed(let itemID, let reason):
|
||||
state.bindings.redactConfirmationInfo = nil
|
||||
// A blank reason is no reason at all, so don't send one.
|
||||
timelineInteractionHandler.redact(itemID, reason: reason?.isBlank == false ? reason : nil)
|
||||
case .tappedOnSenderDetails(let sender):
|
||||
handleTappedOnSenderDetails(sender: sender)
|
||||
case .displayEmojiPicker(let itemID):
|
||||
@@ -533,6 +537,8 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
} else {
|
||||
self.state.bindings.actionMenuInfo = actionMenuInfo
|
||||
}
|
||||
case .showRedactConfirmation(let itemID):
|
||||
state.bindings.redactConfirmationInfo = .init(id: itemID)
|
||||
case .showDebugInfo(let debugInfo):
|
||||
state.bindings.debugInfo = debugInfo
|
||||
case .viewInRoomTimeline(let eventID):
|
||||
@@ -1121,7 +1127,7 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
verticalButtons: sendHandle.map { sendHandle in
|
||||
[.init(title: L10n.actionRetry) { [weak self] in self?.retrySending(sendHandle) },
|
||||
.init(title: L10n.actionRemoveMessage, role: .destructive) { [weak self] in
|
||||
self?.timelineInteractionHandler.handleTimelineItemMenuAction(.redact(isMedia: false), itemID: sendHandle.itemID)
|
||||
self?.timelineInteractionHandler.redact(sendHandle.itemID, reason: nil)
|
||||
}]
|
||||
})
|
||||
case .encryptionAuthenticity(let message):
|
||||
|
||||
Reference in New Issue
Block a user