Fix scrolling-issue (#690)
This commit is contained in:
parent
600e91eb4d
commit
a73b7bb348
|
@ -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 }
|
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)
|
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
|
// set tableView
|
||||||
|
|
Loading…
Reference in New Issue