From bc02622d2fa2ec2b58dce5bec3cb63875c50a146 Mon Sep 17 00:00:00 2001 From: Gil Eluard Date: Fri, 25 Mar 2022 13:45:16 +0100 Subject: [PATCH] Sync space order with web #5134 --- Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift | 2 +- changelog.d/5134.bugfix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/5134.bugfix 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