Procházet zdrojové kódy

handle DC_QR_FPR_OK

B. Petersen před 5 roky
rodič
revize
9527fcef2e
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      deltachat-ios/Controller/QrViewController.swift

+ 2 - 3
deltachat-ios/Controller/QrViewController.swift

@@ -164,9 +164,9 @@ class QrViewController: UITableViewController, QrCodeReaderDelegate {
             alert.addAction(UIAlertAction(title: String.localized("ok"), style: .default, handler: nil))
             present(alert, animated: true, completion: nil)
 
-        case DC_QR_ADDR:
+        case DC_QR_ADDR, DC_QR_FPR_OK:
             let nameAndAddress = DcContact(id: qrParsed.id).nameNAddr
-            let msg = String.localizedStringWithFormat(String.localized("ask_start_chat_with"), nameAndAddress)
+            let msg = String.localizedStringWithFormat(String.localized(state==DC_QR_ADDR ? "ask_start_chat_with" : "qrshow_x_verified"), nameAndAddress)
             let alert = UIAlertController(title: msg, message: nil, preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: String.localized("start_chat"), style: .default, handler: { _ in
                 let chatId = self.dcContext.createChat(contactId: qrParsed.id)
@@ -175,7 +175,6 @@ class QrViewController: UITableViewController, QrCodeReaderDelegate {
             alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .default, handler: nil))
             present(alert, animated: true, completion: nil)
 
-
         case DC_QR_TEXT:
             let msg = String.localizedStringWithFormat(String.localized("qrscan_contains_text"), qrParsed.text1 ?? "")
             let alert = UIAlertController(title: msg, message: nil, preferredStyle: .alert)