瀏覽代碼

fix wrong avatar initials in account switch avatar

cyberta 2 年之前
父節點
當前提交
78db319ae8
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      deltachat-ios/Controller/ChatListController.swift

+ 2 - 1
deltachat-ios/Controller/ChatListController.swift

@@ -551,8 +551,9 @@ class ChatListController: UITableViewController, AccountSwitcherHandler {
         accountButtonAvatar.setUnreadMessageCount(getUnreadCounterOfOtherAccounts())
         
         let contact = dcContext.getContact(id: Int(DC_CONTACT_ID_SELF))
+        let title = dcContext.displayname ?? dcContext.addr ?? ""
         accountButtonAvatar.setColor(contact.color)
-        accountButtonAvatar.setName(contact.displayName)
+        accountButtonAvatar.setName(title)
         if let image = contact.profileImage {
             accountButtonAvatar.setImage(image)
         }