From 65ac02bc5c8b4f01cb21e5703c9999b39eb8eef9 Mon Sep 17 00:00:00 2001 From: Gil Eluard Date: Wed, 28 Apr 2021 16:00:19 +0200 Subject: [PATCH] Crash in [RoomViewController setScrollToBottomHidden:] --- CHANGES.rst | 1 + Riot/Modules/Room/RoomViewController.m | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7b88de174..208a9fd17 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Changes to be released in next version 🐛 Bugfix * RoomVC: Avoid navigation to integration management using integration popup with settings set to integration disabled (#4261). * RiotSettings: Logging out resets RiotSettings (#4259). + * RoomVC: Crash in `setScrollToBottomHidden` method (#4270). ⚠️ API Changes * diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 8b3a14c21..fa4be8496 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1355,8 +1355,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (roomDataSource.currentTypingUsers && !roomDataSource.currentTypingUsers.count) { [roomDataSource resetTypingNotification]; - NSInteger count = [self.bubblesTableView numberOfRowsInSection:0]; - [self.bubblesTableView deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:count - 1 inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; + [self.bubblesTableView reloadData]; } }