diff --git a/Tusker.xcodeproj/project.pbxproj b/Tusker.xcodeproj/project.pbxproj index 21bc14ca..f600708d 100644 --- a/Tusker.xcodeproj/project.pbxproj +++ b/Tusker.xcodeproj/project.pbxproj @@ -336,6 +336,7 @@ D6F0B17524A3A1AA001E48C3 /* MainSidebarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F0B17424A3A1AA001E48C3 /* MainSidebarViewController.swift */; }; D6F2E965249E8BFD005846BB /* IssueReporterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F2E963249E8BFD005846BB /* IssueReporterViewController.swift */; }; D6F2E966249E8BFD005846BB /* IssueReporterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D6F2E964249E8BFD005846BB /* IssueReporterViewController.xib */; }; + D6F4D79429ECB0AF00351B87 /* UIBackgroundConfiguration+AppColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F4D79329ECB0AF00351B87 /* UIBackgroundConfiguration+AppColors.swift */; }; D6F6A550291F058600F496A8 /* CreateListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F6A54F291F058600F496A8 /* CreateListService.swift */; }; D6F6A552291F098700F496A8 /* RenameListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F6A551291F098700F496A8 /* RenameListService.swift */; }; D6F6A554291F0D9600F496A8 /* DeleteListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F6A553291F0D9600F496A8 /* DeleteListService.swift */; }; @@ -735,6 +736,7 @@ D6F0B17424A3A1AA001E48C3 /* MainSidebarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainSidebarViewController.swift; sourceTree = ""; }; D6F2E963249E8BFD005846BB /* IssueReporterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueReporterViewController.swift; sourceTree = ""; }; D6F2E964249E8BFD005846BB /* IssueReporterViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IssueReporterViewController.xib; sourceTree = ""; }; + D6F4D79329ECB0AF00351B87 /* UIBackgroundConfiguration+AppColors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIBackgroundConfiguration+AppColors.swift"; sourceTree = ""; }; D6F6A54F291F058600F496A8 /* CreateListService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateListService.swift; sourceTree = ""; }; D6F6A551291F098700F496A8 /* RenameListService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenameListService.swift; sourceTree = ""; }; D6F6A553291F0D9600F496A8 /* DeleteListService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteListService.swift; sourceTree = ""; }; @@ -1226,6 +1228,7 @@ D667E5F02134D5050057A976 /* UIViewController+Delegates.swift */, D667E5F72135C3040057A976 /* Mastodon+Equatable.swift */, D663626B21361C6700C9CBA2 /* Account+Preferences.swift */, + D6F4D79329ECB0AF00351B87 /* UIBackgroundConfiguration+AppColors.swift */, D6333B362137838300CE884A /* AttributedString+Helpers.swift */, D6333B782139AEFD00CE884A /* Date+TimeAgo.swift */, D67C57AE21E28EAD00C3118B /* Array+Uniques.swift */, @@ -2064,6 +2067,7 @@ D663626C21361C6700C9CBA2 /* Account+Preferences.swift in Sources */, D67895C0246870DE00D4CD9E /* LocalAccountAvatarView.swift in Sources */, D6ADB6E828E8C878009924AB /* PublicTimelineDescriptionCollectionViewCell.swift in Sources */, + D6F4D79429ECB0AF00351B87 /* UIBackgroundConfiguration+AppColors.swift in Sources */, D6333B372137838300CE884A /* AttributedString+Helpers.swift in Sources */, D681A29A249AD62D0085E54E /* LargeImageContentView.swift in Sources */, D6DFC69E242C490400ACC392 /* TrackpadScrollGestureRecognizer.swift in Sources */, diff --git a/Tusker/Extensions/UIBackgroundConfiguration+AppColors.swift b/Tusker/Extensions/UIBackgroundConfiguration+AppColors.swift new file mode 100644 index 00000000..6cb98467 --- /dev/null +++ b/Tusker/Extensions/UIBackgroundConfiguration+AppColors.swift @@ -0,0 +1,35 @@ +// +// UIBackgroundConfiguration+AppColors.swift +// Tusker +// +// Created by Shadowfacts on 4/16/23. +// Copyright © 2023 Shadowfacts. All rights reserved. +// + +import UIKit + +extension UIBackgroundConfiguration { + static func appListPlainCell(for state: UICellConfigurationState) -> UIBackgroundConfiguration { + var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) + if state.isFocused { + // use default + } else if state.isHighlighted || state.isSelected { + config.backgroundColor = .appSelectedCellBackground + } else { + config.backgroundColor = .appBackground + } + return config + } + + static func appListGroupedCell(for state: UICellConfigurationState) -> UIBackgroundConfiguration { + var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) + if state.isFocused { + // use default + } else if state.isHighlighted || state.isSelected { + config.backgroundColor = .appSelectedCellBackground + } else { + config.backgroundColor = .appGroupedCellBackground + } + return config + } +} diff --git a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift index 22f32ca7..a747de10 100644 --- a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift +++ b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift @@ -68,13 +68,7 @@ class AccountFollowsListViewController: UIViewController, CollectionViewControll cell.updateUI(accountID: item) cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListPlainCell(for: state) } } let loadingCell = UICollectionView.CellRegistration { cell, indexPath, item in diff --git a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift index 28685a19..8b9ef49d 100644 --- a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift +++ b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift @@ -141,13 +141,7 @@ class ExpandThreadCollectionViewCell: UICollectionViewListCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isSelected || state.isHighlighted { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appSecondaryBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } } diff --git a/Tusker/Screens/Explore/ExploreViewController.swift b/Tusker/Screens/Explore/ExploreViewController.swift index f7e6ed9a..b5b92479 100644 --- a/Tusker/Screens/Explore/ExploreViewController.swift +++ b/Tusker/Screens/Explore/ExploreViewController.swift @@ -143,13 +143,7 @@ class ExploreViewController: UIViewController, UICollectionViewDelegate, Collect cell.contentConfiguration = config cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell() - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } switch item { diff --git a/Tusker/Screens/Explore/TrendingLinkTableViewCell.swift b/Tusker/Screens/Explore/TrendingLinkTableViewCell.swift index 5e334510..f51d3730 100644 --- a/Tusker/Screens/Explore/TrendingLinkTableViewCell.swift +++ b/Tusker/Screens/Explore/TrendingLinkTableViewCell.swift @@ -81,13 +81,7 @@ class TrendingLinkTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListGroupedCell(for: state) } func updateUI(card: Card) { diff --git a/Tusker/Screens/Lists/EditListAccountsViewController.swift b/Tusker/Screens/Lists/EditListAccountsViewController.swift index f726e636..76513c6c 100644 --- a/Tusker/Screens/Lists/EditListAccountsViewController.swift +++ b/Tusker/Screens/Lists/EditListAccountsViewController.swift @@ -63,13 +63,7 @@ class EditListAccountsViewController: EnhancedTableViewController { cell.delegate = self cell.updateUI(accountID: id) cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } return cell }) diff --git a/Tusker/Screens/Preferences/SwipeActionsPrefsView.swift b/Tusker/Screens/Preferences/SwipeActionsPrefsView.swift index 77017d70..4d133ebc 100644 --- a/Tusker/Screens/Preferences/SwipeActionsPrefsView.swift +++ b/Tusker/Screens/Preferences/SwipeActionsPrefsView.swift @@ -61,13 +61,7 @@ class SwipeActionsPrefsViewController: UIViewController, UICollectionViewDelegat cell.contentConfiguration = config cell.accessories = [.reorder(displayed: .always)] cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } } let dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView) { collectionView, indexPath, itemIdentifier in diff --git a/Tusker/Screens/Search/SearchResultsViewController.swift b/Tusker/Screens/Search/SearchResultsViewController.swift index 33931cee..6f4204af 100644 --- a/Tusker/Screens/Search/SearchResultsViewController.swift +++ b/Tusker/Screens/Search/SearchResultsViewController.swift @@ -142,13 +142,7 @@ class SearchResultsViewController: UIViewController, CollectionViewController { cell = collectionView.dequeueConfiguredReusableCell(using: statusCell, for: indexPath, item: (id, state)) } cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } return cell } diff --git a/Tusker/Screens/Status Action Account List/StatusActionAccountListCollectionViewController.swift b/Tusker/Screens/Status Action Account List/StatusActionAccountListCollectionViewController.swift index 4826c37f..a18f236e 100644 --- a/Tusker/Screens/Status Action Account List/StatusActionAccountListCollectionViewController.swift +++ b/Tusker/Screens/Status Action Account List/StatusActionAccountListCollectionViewController.swift @@ -89,13 +89,7 @@ class StatusActionAccountListCollectionViewController: UIViewController, Collect cell.updateUI(statusID: item.0, state: item.1, filterResult: .allow, precomputedContent: nil) cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } } let accountCell = UICollectionView.CellRegistration { [unowned self] cell, indexPath, item in @@ -103,13 +97,7 @@ class StatusActionAccountListCollectionViewController: UIViewController, Collect cell.updateUI(accountID: item) cell.configurationUpdateHandler = { cell, state in - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - cell.backgroundConfiguration = config + cell.backgroundConfiguration = .appListGroupedCell(for: state) } } let loadingCell = UICollectionView.CellRegistration { cell, indexPath, item in diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 13a37cdf..538fde9a 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -119,7 +119,7 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro collectionView.delegate = self collectionView.dragDelegate = self collectionView.allowsFocus = true - collectionView.backgroundColor = .appBackground +// collectionView.backgroundColor = .appBackground collectionView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(collectionView) NSLayoutConstraint.activate([ @@ -130,7 +130,6 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro ]) registerTimelineLikeCells() - collectionView.register(PublicTimelineDescriptionCollectionViewCell.self, forCellWithReuseIdentifier: "publicTimelineDescription") dataSource = createDataSource() applyInitialSnapshot() diff --git a/Tusker/Views/Hashtag Cell/TrendingHashtagCollectionViewCell.swift b/Tusker/Views/Hashtag Cell/TrendingHashtagCollectionViewCell.swift index be9c58c2..9bde0085 100644 --- a/Tusker/Views/Hashtag Cell/TrendingHashtagCollectionViewCell.swift +++ b/Tusker/Views/Hashtag Cell/TrendingHashtagCollectionViewCell.swift @@ -59,13 +59,7 @@ class TrendingHashtagCollectionViewCell: UICollectionViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListGroupedCell(for: state) } func updateUI(hashtag: Hashtag) { diff --git a/Tusker/Views/Instance Cell/InstanceTableViewCell.swift b/Tusker/Views/Instance Cell/InstanceTableViewCell.swift index 4d427d2b..d398d655 100644 --- a/Tusker/Views/Instance Cell/InstanceTableViewCell.swift +++ b/Tusker/Views/Instance Cell/InstanceTableViewCell.swift @@ -40,13 +40,7 @@ class InstanceTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listGroupedCell() - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListGroupedCell(for: state) } func updateUI(instance: InstanceSelector.Instance) { diff --git a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift index 3cdbf24d..f998aa8c 100644 --- a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift +++ b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift @@ -49,13 +49,7 @@ class ActionNotificationGroupTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } @objc func updateUIForPreferences() { diff --git a/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift b/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift index ad8fec61..017a98bf 100644 --- a/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift +++ b/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift @@ -44,13 +44,7 @@ class FollowNotificationGroupTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } @objc func updateUIForPreferences() { diff --git a/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.swift b/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.swift index 01485aaf..8f977862 100644 --- a/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.swift +++ b/Tusker/Views/Notifications/FollowRequestNotificationTableViewCell.swift @@ -50,13 +50,7 @@ class FollowRequestNotificationTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } @objc func updateUIForPreferences() { diff --git a/Tusker/Views/Notifications/PollFinishedTableViewCell.swift b/Tusker/Views/Notifications/PollFinishedTableViewCell.swift index 2ceb7265..d568237a 100644 --- a/Tusker/Views/Notifications/PollFinishedTableViewCell.swift +++ b/Tusker/Views/Notifications/PollFinishedTableViewCell.swift @@ -39,13 +39,7 @@ class PollFinishedTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } func updateUI(notification: Pachyderm.Notification) { diff --git a/Tusker/Views/Notifications/StatusUpdatedNotificationTableViewCell.swift b/Tusker/Views/Notifications/StatusUpdatedNotificationTableViewCell.swift index 839ba6eb..fb7df591 100644 --- a/Tusker/Views/Notifications/StatusUpdatedNotificationTableViewCell.swift +++ b/Tusker/Views/Notifications/StatusUpdatedNotificationTableViewCell.swift @@ -36,13 +36,7 @@ class StatusUpdatedNotificationTableViewCell: UITableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } func updateUI(notification: Pachyderm.Notification) { diff --git a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift index 7093c1ab..160a017c 100644 --- a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift @@ -318,9 +318,7 @@ class ConversationMainStatusCollectionViewCell: UICollectionViewListCell, Status } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - config.backgroundColor = .appBackground - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } // MARK: Configure UI diff --git a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift index 3a1c9223..843301a8 100644 --- a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift @@ -352,13 +352,7 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } // MARK: Accessibility diff --git a/Tusker/Views/Status/TimelineStatusTableViewCell.swift b/Tusker/Views/Status/TimelineStatusTableViewCell.swift index e0bd69bd..33491588 100644 --- a/Tusker/Views/Status/TimelineStatusTableViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusTableViewCell.swift @@ -94,13 +94,7 @@ class TimelineStatusTableViewCell: BaseStatusTableViewCell { } override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listPlainCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListPlainCell(for: state) } override func createObserversIfNecessary() { diff --git a/Tusker/Views/Status/TrendingStatusCollectionViewCell.swift b/Tusker/Views/Status/TrendingStatusCollectionViewCell.swift index 8e7ea298..15557999 100644 --- a/Tusker/Views/Status/TrendingStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TrendingStatusCollectionViewCell.swift @@ -10,12 +10,6 @@ import UIKit class TrendingStatusCollectionViewCell: TimelineStatusCollectionViewCell { override func updateConfiguration(using state: UICellConfigurationState) { - var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state) - if state.isHighlighted || state.isSelected { - config.backgroundColor = .appSelectedCellBackground - } else { - config.backgroundColor = .appGroupedCellBackground - } - backgroundConfiguration = config + backgroundConfiguration = .appListGroupedCell(for: state) } }