浏览代码

fix redraw error

the subviews are added each time the settings view is opened;
by this, the same texts are drawn on top of each other
which lead to a "bold" font.
as a quick fix, to not handle changes etc.,
we just remove all existing subviews before adding new ones.
B. Petersen 5 年之前
父节点
当前提交
7adb3c50ad
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      deltachat-ios/Controller/SettingsController.swift

+ 3 - 0
deltachat-ios/Controller/SettingsController.swift

@@ -98,6 +98,9 @@ internal final class SettingsViewController: QuickTableViewController {
 
     private func customProfileCell(_ tableView: UITableView, indexPath: IndexPath) -> UITableViewCell {
         let cell = super.tableView(tableView, cellForRowAt: indexPath)
+
+        cell.contentView.subviews.forEach({ $0.removeFromSuperview() })
+
         let badge = createProfileBadge()
         let nameLabel = createNameLabel()
         let signatureLabel = createSubtitle()