forked from shadowfacts/Tusker
Fix follows account list using wrong separator insets
This commit is contained in:
parent
cced930549
commit
395ce6523d
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue