Explorar o código

update contact row in QR-View controller on viewDidAppear, in order to show the correct avatar after a new one was selected

cyberta %!s(int64=5) %!d(string=hai) anos
pai
achega
db96e89315
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      deltachat-ios/Controller/QrViewController.swift

+ 7 - 0
deltachat-ios/Controller/QrViewController.swift

@@ -34,6 +34,13 @@ class QrViewController: UITableViewController, QrCodeReaderDelegate {
         tableView.separatorStyle = .none
     }
 
+    override func viewDidAppear(_ animated: Bool) {
+        let indexPath = IndexPath(row: rowContact, section: 0)
+        tableView.beginUpdates()
+        tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
+        tableView.endUpdates()
+    }
+    
     override func tableView(_: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let row = indexPath.row
         switch row {