Reload section if total number of rooms changes, fixes #5448

This commit is contained in:
ismailgulek
2022-02-02 16:43:52 +03:00
parent 313b05485a
commit bbd8b3e764
6 changed files with 66 additions and 15 deletions

View File

@@ -1467,12 +1467,14 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
#pragma mark - RecentsListServiceDelegate
- (void)recentsListServiceDidChangeData:(id<RecentsListServiceProtocol>)service
totalCountsChanged:(BOOL)totalCountsChanged
{
// no-op
}
- (void)recentsListServiceDidChangeData:(id<RecentsListServiceProtocol>)service
forSection:(RecentsListServiceSection)section
totalCountsChanged:(BOOL)totalCountsChanged
{
NSInteger sectionIndex = -1;
switch (section)
@@ -1499,8 +1501,10 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
sectionIndex = suggestedRoomsSection;
break;
}
[self.delegate dataSource:self didCellChange:@(sectionIndex)];
RecentsSectionUpdate *update = [[RecentsSectionUpdate alloc] initWithSectionIndex:sectionIndex
totalCountsChanged:totalCountsChanged];
[self.delegate dataSource:self didCellChange:update];
}
@end