From dbc89509d7ad5a82c43f06d11c74feb03286d932 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 15 May 2023 21:25:01 -0400 Subject: [PATCH] Fix expand thread cell using wrong background color Closes #383 --- .../Conversation/ExpandThreadCollectionViewCell.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift index 260dfa5d..62275b76 100644 --- a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift +++ b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift @@ -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 } }