mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Hook up the actions in the media details sheet. (#3607)
This commit is contained in:
@@ -51,14 +51,16 @@ class TimelineMediaPreviewViewModel: TimelineMediaPreviewViewModelType {
|
||||
case .menuAction(let action):
|
||||
switch action {
|
||||
case .viewInRoomTimeline:
|
||||
actionsSubject.send(.viewInTimeline)
|
||||
actionsSubject.send(.viewInRoomTimeline(state.currentItem.id))
|
||||
case .redact:
|
||||
state.bindings.isPresentingRedactConfirmation = true
|
||||
default:
|
||||
MXLog.error("Received unexpected action: \(action)")
|
||||
}
|
||||
case .redactConfirmation:
|
||||
break // Do it here??
|
||||
timelineViewModel.context.send(viewAction: .handleTimelineItemMenuAction(itemID: state.currentItem.id, action: .redact))
|
||||
state.bindings.isPresentingRedactConfirmation = false
|
||||
actionsSubject.send(.dismiss) // Will dismiss the details sheet and the QuickLook view.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user