Browse Source

close item appearance condition fixed

nayooti 5 năm trước cách đây
mục cha
commit
95d21a5798

+ 1 - 1
deltachat-ios/Controller/PreviewController.swift

@@ -23,7 +23,7 @@ class PreviewController: QLPreviewController {
 
 
     override func viewDidLoad() {
     override func viewDidLoad() {
         super.viewDidLoad()
         super.viewDidLoad()
-        if navigationController != nil && isBeingPresented {
+        if navigationController?.isBeingPresented ?? false {
             /* QLPreviewController comes with a done-button by default. But if is embedded in UINavigationContrller we need to set a done-button manually.
             /* QLPreviewController comes with a done-button by default. But if is embedded in UINavigationContrller we need to set a done-button manually.
             */
             */
             navigationItem.leftBarButtonItem = doneButtonItem
             navigationItem.leftBarButtonItem = doneButtonItem