mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Fix the presentation of QuickLook when viewing logs on macOS. (#3556)
This commit is contained in:
parent
fe984a1301
commit
3f0f442937
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Combine
|
import Combine
|
||||||
|
import Foundation
|
||||||
|
|
||||||
struct BugReportFlowCoordinatorParameters {
|
struct BugReportFlowCoordinatorParameters {
|
||||||
enum PresentationMode {
|
enum PresentationMode {
|
||||||
@ -93,12 +94,22 @@ class BugReportFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
|
|
||||||
switch action {
|
switch action {
|
||||||
case .done:
|
case .done:
|
||||||
internalNavigationStackCoordinator?.pop()
|
if ProcessInfo.processInfo.isiOSAppOnMac {
|
||||||
|
internalNavigationStackCoordinator?.setSheetCoordinator(nil)
|
||||||
|
} else {
|
||||||
|
internalNavigationStackCoordinator?.pop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
internalNavigationStackCoordinator?.push(coordinator)
|
if ProcessInfo.processInfo.isiOSAppOnMac {
|
||||||
|
// On macOS the QuickLook is a separate window, closing a pushed QuickLook
|
||||||
|
// controller closes the whole Settings sheet so lets add another one.
|
||||||
|
internalNavigationStackCoordinator?.setSheetCoordinator(coordinator)
|
||||||
|
} else {
|
||||||
|
internalNavigationStackCoordinator?.push(coordinator)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func dismiss() {
|
private func dismiss() {
|
||||||
|
@ -25,11 +25,7 @@ private struct PreviewView: UIViewControllerRepresentable {
|
|||||||
previewController.dataSource = context.coordinator
|
previewController.dataSource = context.coordinator
|
||||||
previewController.delegate = context.coordinator
|
previewController.delegate = context.coordinator
|
||||||
|
|
||||||
if ProcessInfo.processInfo.isiOSAppOnMac {
|
return UINavigationController(rootViewController: previewController)
|
||||||
return previewController
|
|
||||||
} else {
|
|
||||||
return UINavigationController(rootViewController: previewController)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateUIViewController(_ uiViewController: UIViewController, context: Context) { }
|
func updateUIViewController(_ uiViewController: UIViewController, context: Context) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user