瀏覽代碼

AppCoordinator: Dismiss directly migrationViewController

In the case of a fresh install of the app or even an empty or small
library, the tabBarController didn't have the time to finish to present
the VC therefore failing the check in `medialibraryDidFinishMigration`.

Removing the migrationViewController directly resolve this issue.
Soomin Lee 6 年之前
父節點
當前提交
535a97a540
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      Sources/Coordinators/AppCoordinator.swift

+ 3 - 5
Sources/Coordinators/AppCoordinator.swift

@@ -70,11 +70,9 @@ extension AppCoordinator: MediaLibraryMigrationDelegate {
     }
 
     func medialibraryDidFinishMigration(_ medialibrary: MediaLibraryService) {
-        if tabBarController.presentedViewController === migrationViewController {
-            DispatchQueue.main.async {
-                [tabBarController] in
-                tabBarController.dismiss(animated: true, completion: nil)
-            }
+        DispatchQueue.main.async {
+            [migrationViewController] in
+            migrationViewController.dismiss(animated: true, completion: nil)
         }
     }