Hook up the actions in the media details sheet. (#3607)

This commit is contained in:
Doug
2024-12-12 09:22:36 +00:00
committed by GitHub
parent 114255c5ec
commit 88b5426e97
12 changed files with 109 additions and 13 deletions
@@ -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.
}
}