소스 검색

fix wrong avatar initials in account switch avatar

cyberta 3 년 전
부모
커밋
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)
         }