Observe YapDatabaseModifiedExternallyNotification.

pull/1/head
Matthew Chen 7 years ago
parent 9aa05733dc
commit 64762eb427

@ -291,6 +291,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedExternallyNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationWillEnterForeground:)
name:UIApplicationWillEnterForegroundNotification

@ -136,6 +136,10 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedExternallyNotification
object:nil];
}
- (void)dealloc

@ -66,7 +66,10 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedNotification
object:self.dbConnection.database];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedExternallyNotification
object:self.dbConnection.database];
self.refreshControl = [UIRefreshControl new];
[self.refreshControl addTarget:self action:@selector(refreshDevices) forControlEvents:UIControlEventValueChanged];

@ -72,6 +72,10 @@ NS_ASSUME_NONNULL_BEGIN
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedNotification
object:database];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedExternallyNotification
object:database];
}
return _uiDatabaseConnection;
}

@ -125,6 +125,10 @@ NS_ASSUME_NONNULL_BEGIN
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModified:)
name:YapDatabaseModifiedExternallyNotification
object:nil];
}
- (void)yapDatabaseModified:(NSNotification *)notification

Loading…
Cancel
Save