Ver código fonte

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 anos atrás
pai
commit
7adb3c50ad
1 arquivos alterados com 3 adições e 0 exclusões
  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()