Fix scrolling-issue (#690)

This commit is contained in:
Nathan Mattes 2023-01-05 18:52:38 +01:00
parent 600e91eb4d
commit a73b7bb348
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ extension MastodonPickServerViewModel {
guard let indexPath = self.serverSectionHeaderView.diffableDataSource?.indexPath(for: .category(category: .init(category: Mastodon.Entity.Category.Kind.general.rawValue, serversCount: 0))) else { return }
self.serverSectionHeaderView.collectionView.selectItem(at: indexPath, animated: false, scrollPosition: .right)
let firstIndex = IndexPath(item: 0, section: 0)
self.serverSectionHeaderView.collectionView.scrollToItem(at: firstIndex, at: .left, animated: false)
}
// set tableView