ソースを参照

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

cyberta 5 年 前
コミット
db96e89315
1 ファイル変更7 行追加0 行削除
  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
         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 {
     override func tableView(_: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let row = indexPath.row
         let row = indexPath.row
         switch row {
         switch row {