Pārlūkot izejas kodu

Merge pull request #923 from deltachat/better-configure-errors

adapt to new dc_configure() error handling
cyBerta 4 gadi atpakaļ
vecāks
revīzija
11fb38d257
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 2
      DcCore/DcCore/DC/events.swift
  2. 1 0
      deltachat-ios/AppDelegate.swift

+ 1 - 2
DcCore/DcCore/DC/events.swift

@@ -49,14 +49,13 @@ public func handleEvent(event: DcEvent) {
                     "progress": Int(data1),
                     "error": Int(data1) == 0,
                     "done": done,
-                    "errorMessage": DcContext.shared.lastErrorString as Any,
+                    "errorMessage": event.data2String,
                 ]
             )
 
             if done {
                 UserDefaults.standard.set(true, forKey: Constants.Keys.deltachatUserProvidedCredentialsKey)
                 UserDefaults.standard.synchronize()
-                DcContext.shared.lastErrorString = nil
             }
         }
 

+ 1 - 0
deltachat-ios/AppDelegate.swift

@@ -196,6 +196,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         dcContext.setStockTranslation(id: DC_STR_MSGACTIONBYUSER, localizationKey: "systemmsg_action_by_user")
         dcContext.setStockTranslation(id: DC_STR_MSGACTIONBYME, localizationKey: "systemmsg_action_by_me")
         dcContext.setStockTranslation(id: DC_STR_DEVICE_MESSAGES, localizationKey: "device_talk")
+        dcContext.setStockTranslation(id: DC_STR_CONFIGURATION_FAILED, localizationKey: "configuration_failed_with_error")
     }
 
     func installEventHandler() {