Fix a flickering issue when the timeline datasource is reloaded.

This commit is contained in:
Nicolas Mauri
2023-04-28 15:47:51 +02:00
parent 1574611c90
commit b6811fd99b
2 changed files with 8 additions and 12 deletions
@@ -456,11 +456,6 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
}
- (void)reset
{
[self resetNotifying:YES];
}
- (void)resetNotifying:(BOOL)notify
{
if (roomDidFlushDataNotificationObserver)
{
@@ -556,12 +551,6 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
}
_serverSyncEventCount = 0;
// Notify the delegate to reload its tableview
if (notify && self.delegate)
{
[self.delegate dataSource:self didCellChange:nil];
}
}
- (void)reload
@@ -575,10 +564,16 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
[self setState:MXKDataSourceStatePreparing];
[self resetNotifying:notify];
[self reset];
// Reload
[self didMXSessionStateChange];
// Notify the delegate to refresh the tableview
if (notify && self.delegate)
{
[self.delegate dataSource:self didCellChange:nil];
}
}
- (void)destroy