Skip to content

Commit

Permalink
Fail to open a sub space #5965
Browse files Browse the repository at this point in the history
- Update after review
  • Loading branch information
gileluard committed Apr 28, 2022
1 parent 5f67a5a commit 80ea20b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,8 @@ final class SpaceListViewModel: SpaceListViewModelType {
var foundIndexPath: IndexPath?

if let spaceService = self.userSessionsService.mainUserSession?.matrixSession.spaceService,
let ancestorIds = spaceService.ancestorsPerRoomId[spaceId] {
for ancestorId in ancestorIds {
if spaceService.ancestorsPerRoomId[ancestorId] == nil {
if let indexPath = indexPathOf(spaceWithId: ancestorId) {
foundIndexPath = indexPath
break
}
}
}
let firstRootAncestor = spaceService.firstRootAncestorForRoom(withId: spaceId) {
foundIndexPath = indexPathOf(spaceWithId: firstRootAncestor.spaceId)
} else {
foundIndexPath = indexPathOf(spaceWithId: spaceId)
}
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/TabBar/MasterTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ - (void)filterRoomsWithParentId:(NSString*)roomParentId
if (firstRootAncestor)
{
rootName = [mxSession roomSummaryWithRoomId:firstRootAncestor.spaceId].displayname;
[breadcrumbs addObject:rootName];
[breadcrumbs insertObject:rootName atIndex:0];
}
titleView.breadcrumbView.breadcrumbs = breadcrumbs;
}
Expand Down

0 comments on commit 80ea20b

Please sign in to comment.