From 3c7f42541ae9b7921d66f87155659b2b9d0dc38f Mon Sep 17 00:00:00 2001 From: Ivan Sein Date: Tue, 26 Nov 2024 18:55:23 +0100 Subject: [PATCH] Use correct section for room list section indexes. Signed-off-by: Ivan Sein --- NextcloudTalk/RoomsTableViewController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NextcloudTalk/RoomsTableViewController.m b/NextcloudTalk/RoomsTableViewController.m index 39443ca30..1a5a6f568 100644 --- a/NextcloudTalk/RoomsTableViewController.m +++ b/NextcloudTalk/RoomsTableViewController.m @@ -916,7 +916,7 @@ - (void)updateMentionsIndicator for (int i = (int)lastVisibleRowIndexPath.row; i <= (int)_lastRoomWithMentionIndexPath.row && i < [_rooms count]; i++) { NCRoom *room = [_rooms objectAtIndex:i]; if (room.hasUnreadMention) { - _nextRoomWithMentionIndexPath = [NSIndexPath indexPathForRow:i inSection:1]; + _nextRoomWithMentionIndexPath = [NSIndexPath indexPathForRow:i inSection:kRoomsSectionRoomList]; break; } } @@ -942,7 +942,7 @@ - (void)calculateLastRoomWithMention for (int i = 0; i < _rooms.count; i++) { NCRoom *room = [_rooms objectAtIndex:i]; if (room.hasUnreadMention) { - _lastRoomWithMentionIndexPath = [NSIndexPath indexPathForRow:i inSection:1]; + _lastRoomWithMentionIndexPath = [NSIndexPath indexPathForRow:i inSection:kRoomsSectionRoomList]; } } } @@ -1226,7 +1226,7 @@ - (NSIndexPath *)indexPathForRoom:(NCRoom *)room }]; if (idx != NSNotFound) { - return [NSIndexPath indexPathForRow:idx inSection:1]; + return [NSIndexPath indexPathForRow:idx inSection:kRoomsSectionRoomList]; } return nil; @@ -1808,7 +1808,7 @@ - (void)highlightSelectedRoom }]; if (idx != NSNotFound) { - NSIndexPath* indexPath = [NSIndexPath indexPathForRow:idx inSection:1]; + NSIndexPath* indexPath = [NSIndexPath indexPathForRow:idx inSection:kRoomsSectionRoomList]; [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; } } else {