Story improvements

This commit is contained in:
Ali
2023-09-08 19:22:12 +04:00
parent 53f6d62e8b
commit 6910ec9334
22 changed files with 511 additions and 208 deletions

View File

@@ -70,17 +70,20 @@ final class EmojiSearchStatusComponent: Component {
}
let theme: PresentationTheme
let forceNeedsVibrancy: Bool
let strings: PresentationStrings
let useOpaqueTheme: Bool
let content: Content
init(
theme: PresentationTheme,
forceNeedsVibrancy: Bool,
strings: PresentationStrings,
useOpaqueTheme: Bool,
content: Content
) {
self.theme = theme
self.forceNeedsVibrancy = forceNeedsVibrancy
self.strings = strings
self.useOpaqueTheme = useOpaqueTheme
self.content = content
@@ -90,6 +93,9 @@ final class EmojiSearchStatusComponent: Component {
if lhs.theme !== rhs.theme {
return false
}
if lhs.forceNeedsVibrancy != rhs.forceNeedsVibrancy {
return false
}
if lhs.strings !== rhs.strings {
return false
}
@@ -430,7 +436,13 @@ final class EmojiSearchStatusComponent: Component {
let displaySize = CGSize(width: availableSize.width * UIScreenScale, height: availableSize.height * UIScreenScale)
self.displaySize = displaySize
let overlayColor = component.useOpaqueTheme ? component.theme.chat.inputMediaPanel.panelContentOpaqueSearchOverlayColor : component.theme.chat.inputMediaPanel.panelContentVibrantSearchOverlayColor
let overlayColor: UIColor
if component.theme.overallDarkAppearance && component.forceNeedsVibrancy {
overlayColor = component.theme.chat.inputMediaPanel.panelContentVibrantSearchOverlayColor.withMultipliedAlpha(0.3)
} else {
overlayColor = component.useOpaqueTheme ? component.theme.chat.inputMediaPanel.panelContentOpaqueSearchOverlayColor : component.theme.chat.inputMediaPanel.panelContentVibrantSearchOverlayColor
}
let baseColor: UIColor = .white
if self.contentView.tintColor != overlayColor {