From 98cf10cfea308a559766d87aa8230909f402c3a6 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Wed, 31 Aug 2022 16:57:38 +1000 Subject: [PATCH] fix crash on clicking on more reactors cell --- Session/Conversations/Views & Modals/ReactionListSheet.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Session/Conversations/Views & Modals/ReactionListSheet.swift b/Session/Conversations/Views & Modals/ReactionListSheet.swift index c88c914b2..3aab2bf3e 100644 --- a/Session/Conversations/Views & Modals/ReactionListSheet.swift +++ b/Session/Conversations/Views & Modals/ReactionListSheet.swift @@ -398,6 +398,7 @@ extension ReactionListSheet: UITableViewDelegate, UITableViewDataSource { moreReactorCount: self.reactionSummaries[lastSelectedReactionIndex].number - self.selectedReactionUserList.count, emoji: self.reactionSummaries[lastSelectedReactionIndex].emoji.rawValue ) + footerCell.selectionStyle = .none return footerCell } @@ -421,6 +422,8 @@ extension ReactionListSheet: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) + guard indexPath.row < self.selectedReactionUserList.count else { return } + let cellViewModel: MessageViewModel.ReactionInfo = self.selectedReactionUserList[indexPath.row] guard