From 1025e4dc5c8c25336ec9b87568e4965820fac9c8 Mon Sep 17 00:00:00 2001 From: Doug Date: Fri, 16 Sep 2022 21:50:01 +0100 Subject: [PATCH] Add missing source views for iPad. --- Riot/Modules/Home/AllChats/AllChatsCoordinator.swift | 5 +++-- changelog.d/6654.bugfix | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog.d/6654.bugfix diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 803ef5b714..27af3a94bc 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -344,7 +344,8 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { var subMenuActions: [UIAction] = [] if BuildSettings.sideMenuShowInviteFriends { subMenuActions.append(UIAction(title: VectorL10n.sideMenuActionInviteFriends, image: UIImage(systemName: "square.and.arrow.up.fill")) { [weak self] action in - self?.showInviteFriends(from: nil) + guard let self = self else { return } + self.showInviteFriends(from: self.avatarMenuButton) }) } @@ -585,7 +586,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { signOutAlertPresenter.present(for: keyBackup.state, areThereKeysToBackup: keyBackup.hasKeysToBackup, from: self.allChatsViewController, - sourceView: nil, + sourceView: avatarMenuButton, animated: true) } diff --git a/changelog.d/6654.bugfix b/changelog.d/6654.bugfix new file mode 100644 index 0000000000..1b342f2839 --- /dev/null +++ b/changelog.d/6654.bugfix @@ -0,0 +1 @@ +Fix crash presenting Sign Out or Invite to Element menu items on iPad.