mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix a potential race condition when redacting a message. (#3061)
* Refactor the timeline item menu action provider. - Move it into its own struct. - Use an item, not an ID so it doesn't randomly change. - Move permissions into the room screen view model. * Use the stable ID when redacting/editing/forwarding a message. Just like we do when fetching the item in the actions menu.
This commit is contained in:
@@ -20,3 +20,10 @@ import UIKit
|
||||
protocol RoomTimelineItemProtocol {
|
||||
var id: TimelineItemIdentifier { get }
|
||||
}
|
||||
|
||||
extension RoomTimelineItemProtocol {
|
||||
var isReactable: Bool {
|
||||
guard let eventItem = self as? EventBasedTimelineItemProtocol else { return false }
|
||||
return !eventItem.isRedacted && !eventItem.hasFailedToSend && !eventItem.hasFailedDecryption
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user