From 395ce6523dc2f8e8a8f49783ad8f37150ab3cc77 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 31 Mar 2024 23:14:54 -0400 Subject: [PATCH] Fix follows account list using wrong separator insets --- .../Account Follows/AccountFollowsListViewController.swift | 6 ++++++ Tusker/Screens/Account List/AccountListViewController.swift | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift index 04fc93006f..32d95c26c4 100644 --- a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift +++ b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift @@ -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 diff --git a/Tusker/Screens/Account List/AccountListViewController.swift b/Tusker/Screens/Account List/AccountListViewController.swift index 6135755e15..c598abacb8 100644 --- a/Tusker/Screens/Account List/AccountListViewController.swift +++ b/Tusker/Screens/Account List/AccountListViewController.swift @@ -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)