Merge pull request #1945 from vector-im/MXFileStore_async_state

MXStore: Use the new async [MXStore stateOfRoom:] method
This commit is contained in:
manuroe
2018-07-24 14:38:57 +00:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
@@ -142,7 +142,7 @@
// The selected room is instanciated here.
[[ShareExtensionManager sharedManager].fileStore asyncAccountDataOfRoom:recentCellData.roomSummary.roomId success:^(MXRoomAccountData * _Nonnull accountData) {
[[ShareExtensionManager sharedManager].fileStore asyncStateEventsOfRoom:recentCellData.roomSummary.roomId success:^(NSArray<MXEvent *> * _Nonnull roomStateEvents) {
[[ShareExtensionManager sharedManager].fileStore stateOfRoom:recentCellData.roomSummary.roomId success:^(NSArray<MXEvent *> * _Nonnull roomStateEvents) {
MXSession *session = [[MXSession alloc] initWithMatrixRestClient:[[MXRestClient alloc] initWithCredentials:[ShareExtensionManager sharedManager].userAccount.mxCredentials andOnUnrecognizedCertificateBlock:nil]];
+1 -1
View File
@@ -222,7 +222,7 @@
// since it's neccesary to send text message through it rather than directly
// through MXRestClient due to encryption
[fileStore asyncAccountDataOfRoom:roomID success:^(MXRoomAccountData * _Nonnull roomAccountData) {
[fileStore asyncStateEventsOfRoom:roomID success:^(NSArray<MXEvent *> * _Nonnull stateEvents) {
[fileStore stateOfRoom:roomID success:^(NSArray<MXEvent *> * _Nonnull stateEvents) {
MXSession *session = [[MXSession alloc] initWithMatrixRestClient:account.mxRestClient];
[session setStore:[[MXNoStore alloc] init] success:^{