Merge pull request #1115 from nextcloud/fix-lobby-crash

Fix crash when lobby state is not correctly known
This commit is contained in:
Ivan Sein 2023-03-08 16:23:19 +01:00 коммит произвёл GitHub
Родитель 11ef1245c5 3fc60bcc11
Коммит ecf3dcca72
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -2393,6 +2393,13 @@ NSString * const NCChatViewControllerTalkToUserNotification = @"NCChatViewContro
if (notification.object != self->_chatController) {
return;
}
if ([self shouldPresentLobbyView]) {
self->_hasRequestedInitialHistory = NO;
[self startObservingRoomLobbyFlag];
return;
}
NSMutableArray *messages = [notification.userInfo objectForKey:@"messages"];
if (messages.count > 0) {
@ -2443,7 +2450,6 @@ NSString * const NCChatViewControllerTalkToUserNotification = @"NCChatViewContro
}
[self.tableView reloadData];
[self checkLobbyState];
if (indexPathUnreadMessageSeparator) {
[self.tableView scrollToRowAtIndexPath:indexPathUnreadMessageSeparator atScrollPosition:UITableViewScrollPositionMiddle animated:NO];