Skip to content

Commit

Permalink
Merge pull request #7587 from vector-im/nimau/PSB268_avatar_disappears
Browse files Browse the repository at this point in the history
  • Loading branch information
nimau authored Jun 7, 2023
2 parents b10b75c + 9997a16 commit 3cdedd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Riot/Modules/Home/AllChats/AllChatsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,12 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
let avatarView = UserAvatarView(frame: view.bounds.inset(by: avatarInsets))
avatarView.isUserInteractionEnabled = false
avatarView.update(theme: ThemeService.shared().theme)
avatarView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
avatarView.autoresizingMask = [.flexibleTopMargin, .flexibleBottomMargin]
view.addSubview(avatarView)
NSLayoutConstraint.activate([
view.widthAnchor.constraint(equalToConstant: 36),
view.heightAnchor.constraint(equalToConstant: 36)
])
self.avatarMenuView = avatarView
updateAvatarButtonItem()
viewController.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: view)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-7587.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevents user avatar from disappearing due to incorrect width.

0 comments on commit 3cdedd6

Please sign in to comment.