Merge branch 'develop' into ismail/5068_start_thread

This commit is contained in:
ismailgulek
2022-01-17 11:35:10 +03:00
300 changed files with 6253 additions and 924 deletions
@@ -29,6 +29,7 @@
#import "InviteRecentTableViewCell.h"
#import "DirectoryRecentTableViewCell.h"
#import "RoomIdOrAliasTableViewCell.h"
#import "TableViewCellWithCollectionView.h"
#import "GeneratedInterface-Swift.h"
@@ -192,11 +193,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
[ThemeService.shared.theme applyStyleOnSearchBar:tableSearchBar];
[ThemeService.shared.theme applyStyleOnSearchBar:self.recentsSearchBar];
if (self.recentsTableView.dataSource)
{
// Force table refresh
[self cancelEditionMode:YES];
}
// Force table refresh
[self.recentsTableView reloadData];
[self.emptyView updateWithTheme:ThemeService.shared.theme];
@@ -1007,9 +1005,32 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
- (void)dataSource:(MXKDataSource *)dataSource didCellChange:(id)changes
{
[super dataSource:dataSource didCellChange:changes];
BOOL cellReloaded = NO;
if ([changes isKindOfClass:NSNumber.class])
{
NSInteger section = ((NSNumber *)changes).integerValue;
if (section >= 0)
{
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:section];
UITableViewCell *cell = [self.recentsTableView cellForRowAtIndexPath:indexPath];
if ([cell isKindOfClass:TableViewCellWithCollectionView.class])
{
TableViewCellWithCollectionView *collectionViewCell = (TableViewCellWithCollectionView *)cell;
[collectionViewCell.collectionView reloadData];
cellReloaded = YES;
}
}
}
[self showEmptyViewIfNeeded];
if (!cellReloaded)
{
[super dataSource:dataSource didCellChange:changes];
}
if (changes == nil)
{
[self showEmptyViewIfNeeded];
}
if (dataSource.state == MXKDataSourceStateReady)
{