mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-24 18:59:36 +00:00
Make sure the media details button replaces QuickLook's list button. (#6434)
This commit is contained in:
+6
-3
@@ -225,9 +225,12 @@ class TimelineMediaPreviewController: QLPreviewController {
|
||||
private func updateBarButtons() {
|
||||
guard let topItem = navigationBar?.topItem else { return }
|
||||
|
||||
if topItem.leftBarButtonItem?.customView == nil {
|
||||
let button = UIBarButtonItem(customView: detailsButtonHostingController.view)
|
||||
navigationBar?.topItem?.leftBarButtonItem = button
|
||||
if #available(iOS 27, *) {
|
||||
if topItem.rightBarButtonItem?.customView == nil {
|
||||
topItem.rightBarButtonItem = UIBarButtonItem(customView: detailsButtonHostingController.view)
|
||||
}
|
||||
} else if topItem.leftBarButtonItem?.customView == nil {
|
||||
topItem.leftBarButtonItem = UIBarButtonItem(customView: detailsButtonHostingController.view)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user