mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Fix more warnings
This commit is contained in:
@@ -6,6 +6,9 @@ swift_library(
|
||||
srcs = glob([
|
||||
"Sources/**/*.swift",
|
||||
]),
|
||||
copts = [
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
|
||||
@@ -234,8 +234,8 @@ final class PasscodeEntryControllerNode: ASDisplayNode {
|
||||
if let image = chatControllerBackgroundImage(theme: self.theme, wallpaper: self.wallpaper, mediaBox: self.accountManager.mediaBox, composed: false, knockoutMode: false) {
|
||||
self.background = ImageBasedPasscodeBackground(image: image, size: size)
|
||||
} else {
|
||||
if case let .file(file) = self.wallpaper, !file.settings.colors.isEmpty {
|
||||
self.background = CustomPasscodeBackground(size: size, colors: file.settings.colors.compactMap { UIColor(rgb: $0) }, inverted: (file.settings.intensity ?? 0) < 0)
|
||||
if case let .file(_, _, _, _, _, _, _, _, settings) = self.wallpaper, !settings.colors.isEmpty {
|
||||
self.background = CustomPasscodeBackground(size: size, colors: settings.colors.compactMap { UIColor(rgb: $0) }, inverted: (settings.intensity ?? 0) < 0)
|
||||
} else {
|
||||
self.background = GradientPasscodeBackground(size: size, backgroundColors: self.theme.passcode.backgroundColors.colors, buttonColor: self.theme.passcode.buttonColor)
|
||||
}
|
||||
|
||||
@@ -124,14 +124,9 @@ final class PasscodeEntryButtonNode: HighlightTrackingButtonNode {
|
||||
self.subtitle = subtitle
|
||||
|
||||
if let background = background as? CustomPasscodeBackground {
|
||||
if false, background.inverted {
|
||||
let gradientBackgroundNode = background.makeForegroundNode(backgroundNode: background.makeBackgroundNode())
|
||||
self.gradientBackgroundNode = gradientBackgroundNode as? GradientBackgroundNode.CloneNode
|
||||
} else {
|
||||
let blurredBackgroundColor = (background.inverted ? UIColor(rgb: 0xffffff, alpha: 0.1) : UIColor(rgb: 0x000000, alpha: 0.2), dateFillNeedsBlur(theme: presentationData.theme, wallpaper: presentationData.chatWallpaper))
|
||||
let blurredBackgroundNode = NavigationBackgroundNode(color: blurredBackgroundColor.0, enableBlur: blurredBackgroundColor.1)
|
||||
self.blurredBackgroundNode = blurredBackgroundNode
|
||||
}
|
||||
let blurredBackgroundColor = (background.inverted ? UIColor(rgb: 0xffffff, alpha: 0.1) : UIColor(rgb: 0x000000, alpha: 0.2), dateFillNeedsBlur(theme: presentationData.theme, wallpaper: presentationData.chatWallpaper))
|
||||
let blurredBackgroundNode = NavigationBackgroundNode(color: blurredBackgroundColor.0, enableBlur: blurredBackgroundColor.1)
|
||||
self.blurredBackgroundNode = blurredBackgroundNode
|
||||
}
|
||||
|
||||
self.backgroundNode = ASImageNode()
|
||||
|
||||
Reference in New Issue
Block a user