Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed May 19, 2021
1 parent 15b0f71 commit 2a87567
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions MatrixSDK/MXSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,23 @@ -(void)setStore:(id<MXStore>)store success:(void (^)(void))onStoreDataReady fail
}];
}

// Load the last event for all room summaries.
-(void)loadRoomSummaryLastEvents:(void (^)(void))onComplete
{
dispatch_group_t dispatchGroup = dispatch_group_create();
for (MXRoomSummary *roomSummary in self.roomsSummaries)
{
dispatch_group_enter(dispatchGroup);
[roomSummary loadLastEvent:^{
dispatch_group_leave(dispatchGroup);
}];
}

dispatch_group_notify(dispatchGroup, dispatch_get_main_queue(), ^{
onComplete();
});
}

/// Handle a sync response and decide serverTimeout for the next sync request.
/// @param syncResponse The sync response object
/// @param completion Completion block to be called at the end of the process. Will be called on the caller thread.
Expand Down

0 comments on commit 2a87567

Please sign in to comment.