diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 8765adb05..5f5d5c12f 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -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) diff --git a/changelog.d/pr-7587.bugfix b/changelog.d/pr-7587.bugfix new file mode 100644 index 000000000..1ddb185a9 --- /dev/null +++ b/changelog.d/pr-7587.bugfix @@ -0,0 +1 @@ +Prevents user avatar from disappearing due to incorrect width.