mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Camera improvements
This commit is contained in:
@@ -4,13 +4,16 @@ import UIKit
|
||||
public final class Image: Component {
|
||||
public let image: UIImage?
|
||||
public let tintColor: UIColor?
|
||||
public let size: CGSize?
|
||||
|
||||
public init(
|
||||
image: UIImage?,
|
||||
tintColor: UIColor? = nil
|
||||
tintColor: UIColor? = nil,
|
||||
size: CGSize? = nil
|
||||
) {
|
||||
self.image = image
|
||||
self.tintColor = tintColor
|
||||
self.size = size
|
||||
}
|
||||
|
||||
public static func ==(lhs: Image, rhs: Image) -> Bool {
|
||||
@@ -20,6 +23,9 @@ public final class Image: Component {
|
||||
if lhs.tintColor != rhs.tintColor {
|
||||
return false
|
||||
}
|
||||
if lhs.size != rhs.size {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -36,7 +42,7 @@ public final class Image: Component {
|
||||
self.image = component.image
|
||||
self.tintColor = component.tintColor
|
||||
|
||||
return availableSize
|
||||
return component.size ?? availableSize
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user