Skip to content

Commit

Permalink
Use correct section for room list section indexes.
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sein <[email protected]>
  • Loading branch information
Ivansss committed Nov 26, 2024
1 parent a9b0f0b commit 5434a44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NextcloudTalk/RoomsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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];
}
}
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5434a44

Please sign in to comment.