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 a279909
Showing 1 changed file with 5 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

0 comments on commit a279909

Please sign in to comment.