Fix background-color (IOS-141)
This commit is contained in:
parent
c1b80a73c2
commit
68dc99004c
|
@ -6,6 +6,14 @@ import MastodonAsset
|
|||
class SearchResultDefaultSectionTableViewCell: UITableViewCell {
|
||||
static let reuseIdentifier = "SearchResultDefaultSectionTableViewCell"
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
|
||||
backgroundColor = .secondarySystemGroupedBackground
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
|
||||
|
||||
func configure(item: SearchResultOverviewItem.DefaultSectionEntry) {
|
||||
var content = UIListContentConfiguration.cell()
|
||||
content.image = item.icon
|
||||
|
|
|
@ -17,6 +17,7 @@ class SearchResultsProfileTableViewCell: UITableViewCell {
|
|||
|
||||
contentView.addSubview(condensedUserView)
|
||||
condensedUserView.pinToParent()
|
||||
backgroundColor = .secondarySystemGroupedBackground
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") }
|
||||
|
|
|
@ -34,7 +34,7 @@ class SearchHistoryUserCollectionViewCell: UICollectionViewCell {
|
|||
if state.isHighlighted || state.isSelected {
|
||||
return ThemeService.shared.currentTheme.value.tableViewCellSelectionBackgroundColor
|
||||
} else {
|
||||
return ThemeService.shared.currentTheme.value.secondarySystemGroupedBackgroundColor
|
||||
return .secondarySystemGroupedBackground
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,13 +48,13 @@ extension SearchHistorySection {
|
|||
var backgroundConfiguration = UIBackgroundConfiguration.listGroupedCell()
|
||||
backgroundConfiguration.backgroundColorTransformer = .init { [weak cell] _ in
|
||||
guard let state = cell?.configurationState else {
|
||||
return ThemeService.shared.currentTheme.value.secondarySystemGroupedBackgroundColor
|
||||
return .secondarySystemGroupedBackground
|
||||
}
|
||||
|
||||
if state.isHighlighted || state.isSelected {
|
||||
return ThemeService.shared.currentTheme.value.tableViewCellSelectionBackgroundColor
|
||||
}
|
||||
return ThemeService.shared.currentTheme.value.secondarySystemGroupedBackgroundColor
|
||||
return .secondarySystemGroupedBackground
|
||||
}
|
||||
cell.backgroundConfiguration = backgroundConfiguration
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue