Move data ready notification to RecentsViewController

This commit is contained in:
ismailgulek
2021-09-08 11:18:18 +03:00
parent 46d97ca73f
commit b1309a1aac
4 changed files with 16 additions and 26 deletions
@@ -34,6 +34,8 @@
#import "Riot-Swift.h"
NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewControllerDataReadyNotification";
@interface RecentsViewController () <CreateRoomCoordinatorBridgePresenterDelegate, RoomsDirectoryCoordinatorBridgePresenterDelegate, RoomNotificationSettingsCoordinatorBridgePresenterDelegate>
{
// Tell whether a recents refresh is pending (suspended during editing mode).
@@ -972,6 +974,15 @@
[super dataSource:dataSource didCellChange:changes];
[self showEmptyViewIfNeeded];
if (dataSource.state == MXKDataSourceStateReady)
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[[NSNotificationCenter defaultCenter] postNotificationName:RecentsViewControllerDataReadyNotification
object:self];
});
}
}
#pragma mark - Swipe actions