Skip to content

Commit

Permalink
[Spaces] Show spaces in left panel #4509
Browse files Browse the repository at this point in the history
- Code tweaks after SDK update
  • Loading branch information
gileluard committed Jul 20, 2021
1 parent 82284d5 commit d0c139f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,9 @@ final class SpaceListViewModel: SpaceListViewModelType {
}

private func getSpacesViewData() -> [SpaceListItemViewData] {
return session.spaceService.spaces.compactMap { space -> SpaceListItemViewData? in
guard let summary = space.summary else {
return nil
}
return session.spaceService.rootSpaceSummaries.map { summary in
let avatarViewData = AvatarViewData(avatarUrl: summary.avatar, mediaManager: self.session.mediaManager, fallbackImage: .matrixItem(summary.roomId, summary.displayname))
return SpaceListItemViewData(spaceId: summary.roomId,
title: summary.displayname, avatarViewData: avatarViewData)
return SpaceListItemViewData(spaceId: summary.roomId, title: summary.displayname, avatarViewData: avatarViewData)
}
}

Expand Down

0 comments on commit d0c139f

Please sign in to comment.