mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 20:56:57 +02:00
Introduce roomListDataReady on HomeViewController
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
|
||||
#import "MXRoom+Riot.h"
|
||||
|
||||
NSString *const HomeViewControllerRoomListDataReadyNotification = @"HomeViewControllerRoomListDataReadyNotification";
|
||||
|
||||
@interface HomeViewController () <SecureBackupSetupCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
RecentsDataSource *recentsDataSource;
|
||||
@@ -46,6 +48,8 @@
|
||||
@property (nonatomic, strong) CrossSigningSetupBannerCell *keyVerificationSetupBannerPrototypeCell;
|
||||
@property (nonatomic, strong) CrossSigningSetupCoordinatorBridgePresenter *crossSigningSetupCoordinatorBridgePresenter;
|
||||
|
||||
@property (nonatomic, assign, readwrite) BOOL roomListDataReady;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HomeViewController
|
||||
@@ -72,6 +76,8 @@
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
self.roomListDataReady = NO;
|
||||
|
||||
self.view.accessibilityIdentifier = @"HomeVCView";
|
||||
self.recentsTableView.accessibilityIdentifier = @"HomeVCTableView";
|
||||
|
||||
@@ -859,4 +865,18 @@
|
||||
+ recentsDataSource.serverNoticeCellDataArray.count;
|
||||
}
|
||||
|
||||
- (void)dataSource:(MXKDataSource *)dataSource didCellChange:(id)changes
|
||||
{
|
||||
[super dataSource:dataSource didCellChange:changes];
|
||||
|
||||
if (dataSource.state == MXKDataSourceStateReady)
|
||||
{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
self.roomListDataReady = YES;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:HomeViewControllerRoomListDataReadyNotification object:nil];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user