Browse Source

show unread messages in account switch UI

cyberta 2 years ago
parent
commit
c3a77c3178
1 changed files with 3 additions and 1 deletions
  1. 3 1
      deltachat-ios/Controller/AccountSwitchViewController.swift

+ 3 - 1
deltachat-ios/Controller/AccountSwitchViewController.swift

@@ -241,7 +241,7 @@ class AccountCell: UITableViewCell {
             accountAvatar.constraintCenterYTo(contentView),
             accountAvatar.constraintAlignLeadingToAnchor(margins.leadingAnchor),
             accountName.constraintAlignTopToAnchor(margins.topAnchor),
-            accountName.constraintToTrailingOf(accountAvatar, paddingLeading: 10),
+            accountName.constraintToTrailingOf(accountAvatar, paddingLeading: 14),
             accountName.constraintAlignBottomToAnchor(margins.bottomAnchor),
             accountName.constraintAlignTrailingToAnchor(margins.trailingAnchor, paddingTrailing: 32, priority: .defaultLow),
             stateIndicator.constraintCenterYTo(contentView),
@@ -263,6 +263,8 @@ class AccountCell: UITableViewCell {
         if let image = contact.profileImage {
             accountAvatar.setImage(image)
         }
+
+        accountAvatar.setUnreadMessageCount(dcContext.getFreshMessages().count)
         accountName.text = title
         if showAccountDeletion {
             showDeleteIndicator()