Преглед на файлове

allow to select particular backup file, improves import of backups of multiple accounts

cyberta преди 2 години
родител
ревизия
e6a916254c
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      deltachat-ios/Controller/WelcomeViewController.swift
  2. 2 2
      deltachat-ios/Helper/MediaPicker.swift

+ 2 - 2
deltachat-ios/Controller/WelcomeViewController.swift

@@ -585,8 +585,8 @@ extension WelcomeViewController: MediaPickerDelegate {
             securityScopedResource = url
             securityScopedResource = url
         }
         }
 
 
-        if let path = url.relativePath, let filePath = dcContext.imexHasBackup(filePath: path) {
-            importBackup(at: filePath)
+        if let selectedBackupFilePath = url.relativePath {
+             importBackup(at: selectedBackupFilePath)
         } else {
         } else {
             onSelectionCancelled()
             onSelectionCancelled()
             securityScopedResource = nil
             securityScopedResource = nil

+ 2 - 2
deltachat-ios/Helper/MediaPicker.swift

@@ -86,9 +86,9 @@ class MediaPicker: NSObject, UINavigationControllerDelegate {
         let documentPicker: UIDocumentPickerViewController
         let documentPicker: UIDocumentPickerViewController
         if selectFolder {
         if selectFolder {
             if #available(iOS 15.0, *) {
             if #available(iOS 15.0, *) {
-                documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder], asCopy: false)
+                documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.archive], asCopy: false)
             } else {
             } else {
-                documentPicker = UIDocumentPickerViewController(documentTypes: [kUTTypeFolder] as [String], in: .open)
+                documentPicker = UIDocumentPickerViewController(documentTypes: [kUTTypeArchive] as [String], in: .open)
             }
             }
         } else {
         } else {
             if #available(iOS 15.0, *) {
             if #available(iOS 15.0, *) {