WIP: Media info vc

pull/782/head
Ryan Zhao 1 year ago
parent 94456edd2e
commit 68efe731e7

@ -1558,8 +1558,8 @@ extension ConversationVC:
// MARK: - ContextMenuActionDelegate
func info(_ cellViewModel: MessageViewModel) {
guard let contextMenuVC = self.contextMenuVC else { return }
contextMenuVC.showMessageInfo()
let mediaInfoVC = MediaInfoVC(attachments: (cellViewModel.attachments ?? []))
navigationController?.pushViewController(mediaInfoVC, animated: true)
}
func reply(_ cellViewModel: MessageViewModel) {

@ -163,12 +163,14 @@ extension MediaInfoVC {
}()
let durationContainerStackView: UIStackView = UIStackView(arrangedSubviews: [ durationTitleLabel, durationLabel ])
durationContainerStackView.axis = .vertical
container.addSubview(durationContainerStackView)
durationContainerStackView.pin(.trailing, to: .trailing, of: container)
durationContainerStackView.pin(.top, to: .bottom, of: fileSizeContainerStackView, withInset: Values.mediumSpacing)
durationContainerStackView.set(.width, to: 90)
container.pin(.bottom, to: .bottom, of: durationContainerStackView)
addSubview(container)
container.pin(to: self, withInset: Values.mediumSpacing)
backgroundView.addSubview(container)
container.pin(to: backgroundView, withInset: Values.largeSpacing)
}
}
}

@ -38,6 +38,12 @@ final class MediaInfoVC: BaseVC {
override func viewDidLoad() {
super.viewDidLoad()
self.title = "Message Info"
attachments.forEach {
let mediaInfoView: MediaInfoView = MediaInfoView(attachment: $0)
self.view.addSubview(mediaInfoView)
mediaInfoView.center(in: self.view)
}
}
}

Loading…
Cancel
Save