mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
816ef02fb6
@ -1 +1 @@
|
|||||||
Subproject commit e75e19b1ded7a8512d50b6e0be83408376ca0838
|
Subproject commit aad8bff9bf56b83e46c92bb1157c764544e91001
|
@ -56,13 +56,22 @@ public final class WallpaperBackgroundNode: ASDisplayNode {
|
|||||||
if let bubbleTheme = backgroundNode.bubbleTheme, let wallpaper = backgroundNode.wallpaper, let bubbleCorners = backgroundNode.bubbleCorners {
|
if let bubbleTheme = backgroundNode.bubbleTheme, let wallpaper = backgroundNode.wallpaper, let bubbleCorners = backgroundNode.bubbleCorners {
|
||||||
let graphics = PresentationResourcesChat.principalGraphics(theme: bubbleTheme, wallpaper: wallpaper, bubbleCorners: bubbleCorners)
|
let graphics = PresentationResourcesChat.principalGraphics(theme: bubbleTheme, wallpaper: wallpaper, bubbleCorners: bubbleCorners)
|
||||||
var needsCleanBackground = false
|
var needsCleanBackground = false
|
||||||
self.contentNode.backgroundColor = backgroundNode.contentNode.backgroundColor
|
|
||||||
switch self.bubbleType {
|
switch self.bubbleType {
|
||||||
case .incoming:
|
case .incoming:
|
||||||
self.contentNode.image = graphics.incomingBubbleGradientImage
|
self.contentNode.image = graphics.incomingBubbleGradientImage
|
||||||
|
if graphics.incomingBubbleGradientImage == nil {
|
||||||
|
self.contentNode.backgroundColor = bubbleTheme.chat.message.incoming.bubble.withWallpaper.fill
|
||||||
|
} else {
|
||||||
|
self.contentNode.backgroundColor = nil
|
||||||
|
}
|
||||||
needsCleanBackground = bubbleTheme.chat.message.incoming.bubble.withWallpaper.fill.alpha <= 0.99 || bubbleTheme.chat.message.incoming.bubble.withWallpaper.gradientFill.alpha <= 0.99
|
needsCleanBackground = bubbleTheme.chat.message.incoming.bubble.withWallpaper.fill.alpha <= 0.99 || bubbleTheme.chat.message.incoming.bubble.withWallpaper.gradientFill.alpha <= 0.99
|
||||||
case .outgoing:
|
case .outgoing:
|
||||||
self.contentNode.image = graphics.outgoingBubbleGradientImage
|
self.contentNode.image = graphics.outgoingBubbleGradientImage
|
||||||
|
if graphics.outgoingBubbleGradientImage == nil {
|
||||||
|
self.contentNode.backgroundColor = bubbleTheme.chat.message.outgoing.bubble.withWallpaper.fill
|
||||||
|
} else {
|
||||||
|
self.contentNode.backgroundColor = nil
|
||||||
|
}
|
||||||
needsCleanBackground = bubbleTheme.chat.message.outgoing.bubble.withWallpaper.fill.alpha <= 0.99 || bubbleTheme.chat.message.outgoing.bubble.withWallpaper.gradientFill.alpha <= 0.99
|
needsCleanBackground = bubbleTheme.chat.message.outgoing.bubble.withWallpaper.fill.alpha <= 0.99 || bubbleTheme.chat.message.outgoing.bubble.withWallpaper.gradientFill.alpha <= 0.99
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,6 +107,7 @@ public final class WallpaperBackgroundNode: ASDisplayNode {
|
|||||||
self.insertSubnode(cleanWallpaperNode, at: 0)
|
self.insertSubnode(cleanWallpaperNode, at: 0)
|
||||||
}
|
}
|
||||||
self.cleanWallpaperNode?.contents = backgroundNode.contentNode.contents
|
self.cleanWallpaperNode?.contents = backgroundNode.contentNode.contents
|
||||||
|
self.cleanWallpaperNode?.backgroundColor = backgroundNode.contentNode.backgroundColor
|
||||||
} else {
|
} else {
|
||||||
if let cleanWallpaperNode = self.cleanWallpaperNode {
|
if let cleanWallpaperNode = self.cleanWallpaperNode {
|
||||||
self.cleanWallpaperNode = nil
|
self.cleanWallpaperNode = nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user