Fix Home sidebar item getting deselected immediately on load
This commit is contained in:
parent
2c9f00d19f
commit
c34ce758dd
|
@ -168,7 +168,13 @@ class MainSidebarViewController: UIViewController {
|
||||||
.profileDirectory,
|
.profileDirectory,
|
||||||
], toSection: .discover)
|
], toSection: .discover)
|
||||||
}
|
}
|
||||||
|
let prevSelected = collectionView.indexPathsForSelectedItems
|
||||||
|
|
||||||
dataSource.apply(snapshot, animatingDifferences: false)
|
dataSource.apply(snapshot, animatingDifferences: false)
|
||||||
|
|
||||||
|
if let prevSelected = prevSelected?.first {
|
||||||
|
collectionView.selectItem(at: prevSelected, animated: false, scrollPosition: .top)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func reloadLists() {
|
private func reloadLists() {
|
||||||
|
|
Loading…
Reference in New Issue