mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix build
This commit is contained in:
parent
0ebc5dac3a
commit
b62fd285d6
2 changed files with 11 additions and 2 deletions
|
|
@ -771,11 +771,13 @@ public extension GlassBackgroundView {
|
|||
|
||||
public final class GlassBackgroundComponent: Component {
|
||||
private let size: CGSize
|
||||
private let cornerRadius: CGFloat
|
||||
private let isDark: Bool
|
||||
private let tintColor: GlassBackgroundView.TintColor
|
||||
|
||||
public init(size: CGSize, isDark: Bool, tintColor: GlassBackgroundView.TintColor) {
|
||||
public init(size: CGSize, cornerRadius: CGFloat, isDark: Bool, tintColor: GlassBackgroundView.TintColor) {
|
||||
self.size = size
|
||||
self.cornerRadius = cornerRadius
|
||||
self.isDark = isDark
|
||||
self.tintColor = tintColor
|
||||
}
|
||||
|
|
@ -784,6 +786,9 @@ public final class GlassBackgroundComponent: Component {
|
|||
if lhs.size != rhs.size {
|
||||
return false
|
||||
}
|
||||
if lhs.cornerRadius != rhs.cornerRadius {
|
||||
return false
|
||||
}
|
||||
if lhs.isDark != rhs.isDark {
|
||||
return false
|
||||
}
|
||||
|
|
@ -795,7 +800,7 @@ public final class GlassBackgroundComponent: Component {
|
|||
|
||||
public final class View: GlassBackgroundView {
|
||||
func update(component: GlassBackgroundComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: ComponentTransition) -> CGSize {
|
||||
self.update(size: component.size, cornerRadius: component.size.height / 2.0, isDark: component.isDark, tintColor: component.tintColor, transition: transition)
|
||||
self.update(size: component.size, cornerRadius: component.cornerRadius, isDark: component.isDark, tintColor: component.tintColor, transition: transition)
|
||||
self.frame = CGRect(origin: .zero, size: component.size)
|
||||
|
||||
return component.size
|
||||
|
|
|
|||
|
|
@ -586,6 +586,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
let flipButtonBackground = flipButtonBackground.update(
|
||||
component: GlassBackgroundComponent(
|
||||
size: CGSize(width: 40.0, height: 40.0),
|
||||
cornerRadius: 40.0 * 0.5,
|
||||
isDark: environment.theme.overallDarkAppearance,
|
||||
tintColor: .init(kind: .panel, color: environment.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7))
|
||||
),
|
||||
|
|
@ -688,6 +689,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
let flashButtonBackground = flashButtonBackground.update(
|
||||
component: GlassBackgroundComponent(
|
||||
size: CGSize(width: 40.0, height: 40.0),
|
||||
cornerRadius: 40.0 * 0.5,
|
||||
isDark: environment.theme.overallDarkAppearance,
|
||||
tintColor: .init(kind: .panel, color: environment.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7))
|
||||
),
|
||||
|
|
@ -719,6 +721,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
component: AnyComponent(
|
||||
GlassBackgroundComponent(
|
||||
size: CGSize(width: 40.0, height: 40.0),
|
||||
cornerRadius: 40.0 * 0.5,
|
||||
isDark: environment.theme.overallDarkAppearance,
|
||||
tintColor: .init(kind: .panel, color: environment.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7))
|
||||
)
|
||||
|
|
@ -763,6 +766,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
|||
id: "background",
|
||||
component: AnyComponent(GlassBackgroundComponent(
|
||||
size: CGSize(width: 40.0, height: 40.0),
|
||||
cornerRadius: 40.0 * 0.5,
|
||||
isDark: environment.theme.overallDarkAppearance,
|
||||
tintColor: .init(kind: .panel, color: environment.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7))
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue