Various fixes

This commit is contained in:
Ilya Laktyushin 2022-09-03 17:55:37 +02:00
parent e558687f63
commit 12558b07c4
7 changed files with 17 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -208,15 +208,10 @@ class PremiumStarComponent: Component {
"rotate",
"tapRotate"
]
// if #available(iOS 11.0, *) {
// for key in keys {
// node.removeAnimation(forKey: key, blendOutDuration: 0.1)
// }
// } else {
for key in keys {
node.removeAnimation(forKey: key)
}
// }
for key in keys {
node.removeAnimation(forKey: key)
}
switch gesture.state {
case .began:
@ -454,12 +449,10 @@ class PremiumStarComponent: Component {
rightParticleSystem.birthRate = 60.0
rightParticleSystem.particleLifeSpan = 4.0
// leftBottomParticleSystem.speedFactor = 2.0
leftBottomParticleSystem.particleVelocity = 1.6
leftBottomParticleSystem.birthRate = 24.0
leftBottomParticleSystem.particleLifeSpan = 7.0
// rightBottomParticleSystem.speedFactor = 2.0
rightBottomParticleSystem.particleVelocity = 1.6
rightBottomParticleSystem.birthRate = 24.0
rightBottomParticleSystem.particleLifeSpan = 7.0

View File

@ -105,8 +105,6 @@ extension PeerEmojiStatus {
self.init(fileId: documentId, expirationDate: until)
case .emojiStatusEmpty:
return nil
case .emojiStatusUntil:
return nil
}
}
}

View File

@ -299,6 +299,13 @@ public func customizeDefaultDarkPresentationTheme(theme: PresentationTheme, edit
)
}
public let defaultDarkWallpaperGradientColors: [UIColor] = [
UIColor(rgb: 0x00b3dd),
UIColor(rgb: 0x3b59f2),
UIColor(rgb: 0x358be2),
UIColor(rgb: 0xa434cf)
]
public func makeDefaultDarkPresentationTheme(extendingThemeReference: PresentationThemeReference? = nil, preview: Bool) -> PresentationTheme {
let rootNavigationBar = PresentationThemeRootNavigationBar(
buttonColor: UIColor(rgb: 0xffffff),
@ -309,7 +316,7 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
accentTextColor: UIColor(rgb: 0xffffff),
blurredBackgroundColor: UIColor(rgb: 0x1d1d1d, alpha: 0.9),
opaqueBackgroundColor: UIColor(rgb: 0x1d1d1d).mixedWith(UIColor(rgb: 0x000000), alpha: 0.1),
separatorColor: UIColor(rgb: 0x3d3d40),
separatorColor: UIColor(rgb: 0x545458, alpha: 0.65),
badgeBackgroundColor: UIColor(rgb: 0xffffff),
badgeStrokeColor: UIColor(rgb: 0x1c1c1d),
badgeTextColor: UIColor(rgb: 0x000000),
@ -486,7 +493,7 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
withWallpaper: PresentationThemeBubbleColorComponents(
fill: [UIColor(rgb: 0x1D1D1D, alpha: incomingBubbleAlpha)],
highlightedFill: UIColor(rgb: 0x353539),
stroke: UIColor(rgb: 0x262628),
stroke: .clear,
shadow: nil,
reactionInactiveBackground: UIColor(rgb: 0xffffff, alpha: 0.1),
reactionInactiveForeground: UIColor(rgb: 0xffffff),
@ -496,7 +503,7 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
withoutWallpaper: PresentationThemeBubbleColorComponents(
fill: [UIColor(rgb: 0x1D1D1D, alpha: incomingBubbleAlpha)],
highlightedFill: UIColor(rgb: 0x353539),
stroke: UIColor(rgb: 0x262628),
stroke: .clear,
shadow: nil,
reactionInactiveBackground: UIColor(rgb: 0xffffff, alpha: 0.1),
reactionInactiveForeground: UIColor(rgb: 0xffffff),
@ -643,8 +650,10 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
badgeTextColor: UIColor(rgb: 0x000000)
)
let defaultPatternWallpaper: TelegramWallpaper = defaultBuiltinWallpaper(data: .default, colors: defaultDarkWallpaperGradientColors.map(\.rgb), intensity: -35)
let chat = PresentationThemeChat(
defaultWallpaper: .color(0x000000),
defaultWallpaper: defaultPatternWallpaper,
animateMessageColors: false,
message: message,
serviceMessage: serviceMessage,