Fix follows account list using wrong separator insets

This commit is contained in:
Shadowfacts 2024-03-31 23:14:54 -04:00
parent cced930549
commit 395ce6523d
2 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,12 @@ class AccountFollowsListViewController: UIViewController, CollectionViewControll
config.topSeparatorVisibility = .hidden
config.bottomSeparatorVisibility = .hidden
}
if config.topSeparatorInsets != .zero {
config.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
}
if config.bottomSeparatorInsets != .zero {
config.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
}
return config
}
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in

View File

@ -33,6 +33,8 @@ class AccountListViewController: UIViewController, CollectionViewController {
override func loadView() {
var config = UICollectionLayoutListConfiguration(appearance: .grouped)
config.backgroundColor = .appGroupedBackground
config.separatorConfiguration.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
config.separatorConfiguration.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
section.readableContentInset(in: environment)