Fix expand thread cell using wrong background color

Closes #383
This commit is contained in:
Shadowfacts 2023-05-15 21:25:01 -04:00
parent 0ba38e4a3a
commit dbc89509d7
1 changed files with 9 additions and 1 deletions

View File

@ -144,7 +144,15 @@ class ExpandThreadCollectionViewCell: UICollectionViewListCell {
}
override func updateConfiguration(using state: UICellConfigurationState) {
backgroundConfiguration = .appListPlainCell(for: state)
var config = UIBackgroundConfiguration.listGroupedCell().updated(for: state)
if state.isFocused {
// use default
} else if state.isHighlighted || state.isSelected {
config.backgroundColor = .appSelectedCellBackground
} else {
config.backgroundColor = .appSecondaryBackground
}
backgroundConfiguration = config
}
}