diff --git a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift index 78594ac5f..c194d0b90 100644 --- a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift +++ b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift @@ -184,7 +184,7 @@ final class SpaceListViewModel: SpaceListViewModelType { var index = 0 for itemViewData in viewDataList { if itemViewData.spaceId == self.selectedItemId { - newSelection = IndexPath(row: index, section: sections.count - 1) + newSelection = IndexPath(row: index, section: spacesSectionIndex) } index += 1 } diff --git a/changelog.d/5134.bugfix b/changelog.d/5134.bugfix new file mode 100644 index 000000000..74df83c35 --- /dev/null +++ b/changelog.d/5134.bugfix @@ -0,0 +1 @@ +Sync Spaces order with web \ No newline at end of file