Skip to content

Commit

Permalink
Fix: Prevents UserAvatarView from disappearing due to incorrect width.
Browse files Browse the repository at this point in the history
  • Loading branch information
nimau committed Jun 7, 2023
1 parent b10b75c commit 9997a16
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 9997a16

Please sign in to comment.