Merge branch 'develop' of https://github.com/vector-im/element-ios into langleyd/5292_refresh_tokens

This commit is contained in:
David Langley
2022-01-14 11:43:09 +00:00
202 changed files with 4056 additions and 709 deletions
+8 -9
View File
@@ -77,7 +77,7 @@
- (void)loadCellData
{
[self.fileStore asyncRoomsSummaries:^(NSArray<MXRoomSummary *> *roomsSummaries) {
[self.fileStore.roomSummaryStore fetchAllSummaries:^(NSArray<id<MXRoomSummaryProtocol>> *summaries) {
NSMutableArray *cellData = [NSMutableArray array];
@@ -87,13 +87,16 @@
// Add a fake matrix session to each room summary to provide it a REST client (used to handle correctly the room avatar).
MXSession *session = [[MXSession alloc] initWithMatrixRestClient:mxRestClient];
for (MXRoomSummary *roomSummary in roomsSummaries)
for (id<MXRoomSummaryProtocol> summary in summaries)
{
if (!roomSummary.hiddenFromUser && roomSummary.roomType == MXRoomTypeRoom)
if (!summary.hiddenFromUser && summary.roomType == MXRoomTypeRoom)
{
[roomSummary setMatrixSession:session];
if ([summary respondsToSelector:@selector(setMatrixSession:)])
{
[summary setMatrixSession:session];
}
MXKRecentCellData *recentCellData = [[MXKRecentCellData alloc] initWithRoomSummary:roomSummary dataSource:nil];
MXKRecentCellData *recentCellData = [[MXKRecentCellData alloc] initWithRoomSummary:summary dataSource:nil];
[cellData addObject:recentCellData];
}
@@ -114,10 +117,6 @@
});
} failure:^(NSError * _Nonnull error) {
MXLogDebug(@"[ShareDataSource failed to get room summaries]");
}];
}