Parcourir la source

some backup improvements (#1501)

* log file size of backup import attempt

due to apple removed the progress bar (WTF!)
on copying files from Finder to iPhone,
it may easily happen, a backup is incomplete.

this will at least give a hint.

cmp. https://developer.apple.com/forums/thread/130051

* use dedicated dc_is_configure()

* Revert "log file size of backup import attempt"

This reverts commit f15fb526e9412b97c3df74c88c0ce3bf35f7ca54.

The logging is done in the core at
https://github.com/deltachat/deltachat-core-rust/pull/3142 now.
bjoern il y a 3 ans
Parent
commit
81b39116cb

+ 1 - 6
DcCore/DcCore/DC/Wrapper.swift

@@ -594,7 +594,7 @@ public class DcContext {
         if let displayname = displayname {
             ret = "\(displayname) (\(ret))"
         }
-        ret += configured ? "" : " (not configured)"
+        ret += isConfigured() ? "" : " (not configured)"
         return ret.trimmingCharacters(in: .whitespaces)
     }
 
@@ -709,11 +709,6 @@ public class DcContext {
         get { return getConfigInt("show_emails") }
         set { setConfigInt("show_emails", newValue) }
     }
-
-    // do not use. use DcContext::isConfigured() instead
-    public var configured: Bool {
-        return getConfigBool("configured")
-    }
 }
 
 

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

@@ -708,7 +708,7 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
 
     private func restoreBackup() {
         logger.info("restoring backup")
-        if dcContext.configured {
+        if dcContext.isConfigured() {
             return
         }
         addProgressHudBackupListener()