fix: discovery For You profile card has the same color in the true dark mode issue
This commit is contained in:
parent
5365fabe01
commit
65dcf7d6c2
|
@ -58,7 +58,12 @@ extension ProfileCardView {
|
||||||
guard let userInterfaceStyle = userInterfaceStyle else { return }
|
guard let userInterfaceStyle = userInterfaceStyle else { return }
|
||||||
switch userInterfaceStyle {
|
switch userInterfaceStyle {
|
||||||
case .dark:
|
case .dark:
|
||||||
self.backgroundColor = theme.systemBackgroundColor
|
switch theme.themeName {
|
||||||
|
case .mastodon:
|
||||||
|
self.backgroundColor = theme.systemBackgroundColor
|
||||||
|
case .system:
|
||||||
|
self.backgroundColor = theme.secondarySystemBackgroundColor
|
||||||
|
}
|
||||||
case .light, .unspecified:
|
case .light, .unspecified:
|
||||||
self.backgroundColor = Asset.Scene.Discovery.profileCardBackground.color
|
self.backgroundColor = Asset.Scene.Discovery.profileCardBackground.color
|
||||||
@unknown default:
|
@unknown default:
|
||||||
|
@ -99,7 +104,10 @@ extension ProfileCardView.ViewModel {
|
||||||
private func bindHeader(view: ProfileCardView) {
|
private func bindHeader(view: ProfileCardView) {
|
||||||
$authorBannerImageURL
|
$authorBannerImageURL
|
||||||
.sink { url in
|
.sink { url in
|
||||||
guard let url = url else { return }
|
guard let url = url, !url.absoluteString.hasSuffix("missing.png") else {
|
||||||
|
view.bannerImageView.image = .placeholder(color: .systemGray3)
|
||||||
|
return
|
||||||
|
}
|
||||||
view.bannerImageView.af.setImage(
|
view.bannerImageView.af.setImage(
|
||||||
withURL: url,
|
withURL: url,
|
||||||
placeholderImage: .placeholder(color: .systemGray3),
|
placeholderImage: .placeholder(color: .systemGray3),
|
||||||
|
|
Loading…
Reference in New Issue