diff --git a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift index 893a2b0806..760306bf00 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDayPresentationTheme.swift @@ -185,27 +185,16 @@ public func customizeDefaultDayTheme(theme: PresentationTheme, specialMode: Bool var outgoingCheckColor: UIColor? if !day { - let bubbleStrokeColor = serviceBackgroundColor?.withMultiplied(hue: 0.999, saturation: 1.667, brightness: 1.1).withAlphaComponent(0.2) - incomingBubbleStrokeColor = bubbleStrokeColor - outgoingBubbleStrokeColor = bubbleStrokeColor + if let outgoingAccent = outgoingAccent { + outgoingBubbleStrokeColor = outgoingAccent.withAlphaComponent(0.2) + } else { + let bubbleStrokeColor = serviceBackgroundColor?.withMultiplied(hue: 0.999, saturation: 1.667, brightness: 1.1).withAlphaComponent(0.2) + incomingBubbleStrokeColor = bubbleStrokeColor + outgoingBubbleStrokeColor = bubbleStrokeColor + } } if !bubbleColors.isEmpty { - //var topBubbleColor = UIColor(rgb: bubbleColors[0]) - //var bottomBubbleColor = UIColor(rgb: bubbleColors.last ?? bubbleColors[0]) - - /*if topBubbleColor.rgb != bottomBubbleColor.rgb { - let topBubbleColorLightness = topBubbleColor.lightness - let bottomBubbleColorLightness = bottomBubbleColor.lightness - if abs(topBubbleColorLightness - bottomBubbleColorLightness) > 0.7 { - if topBubbleColorLightness > bottomBubbleColorLightness { - topBubbleColor = topBubbleColor.withMultiplied(hue: 1.0, saturation: 1.0, brightness: 0.85) - } else { - bottomBubbleColor = bottomBubbleColor.withMultiplied(hue: 1.0, saturation: 1.0, brightness: 0.85) - } - } - }*/ - outgoingBubbleFillColors = bubbleColors.map(UIColor.init(rgb:)) if day { diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 5eb378ebec..6ddd9fa173 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -3920,7 +3920,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G useDarkAppearance = darkAppearancePreview } let customTheme = useDarkAppearance ? theme.darkTheme : theme.theme - if let settings = customTheme.settings, let theme = makePresentationTheme(settings: settings, specialMode: true) { + if let settings = customTheme.settings, let theme = makePresentationTheme(settings: settings) { presentationData = presentationData.withUpdated(theme: theme) presentationData = presentationData.withUpdated(chatWallpaper: theme.chat.defaultWallpaper) } diff --git a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift index 45555eeb24..ba5c8abe8e 100644 --- a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift +++ b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift @@ -1309,7 +1309,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { additionalAnimationNode?.removeFromSupernode() } additionalAnimationNode.frame = animationNode.frame.insetBy(dx: -animationNode.frame.width, dy: -animationNode.frame.height) -// .offsetBy(dx: incoming ? animationNode.frame.width : -animationNode.frame.width, dy: 0.0) + .offsetBy(dx: incoming ? animationNode.frame.width - 10.0 : -animationNode.frame.width + 10.0, dy: 0.0) if incoming { additionalAnimationNode.transform = CATransform3DMakeScale(-1.0, 1.0, 1.0) } diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsController.swift b/submodules/TelegramUI/Sources/ChatRecentActionsController.swift index d49c9a4678..f59ddc8914 100644 --- a/submodules/TelegramUI/Sources/ChatRecentActionsController.swift +++ b/submodules/TelegramUI/Sources/ChatRecentActionsController.swift @@ -179,7 +179,7 @@ final class ChatRecentActionsController: TelegramBaseController { if let themeEmoticon = themeEmoticon, let theme = chatThemes.first(where: { $0.emoji == themeEmoticon }) { let useDarkAppearance = presentationData.theme.overallDarkAppearance let customTheme = useDarkAppearance ? theme.darkTheme : theme.theme - if let settings = customTheme.settings, let theme = makePresentationTheme(settings: settings, specialMode: true) { + if let settings = customTheme.settings, let theme = makePresentationTheme(settings: settings) { presentationData = presentationData.withUpdated(theme: theme) presentationData = presentationData.withUpdated(chatWallpaper: theme.chat.defaultWallpaper) } diff --git a/submodules/WallpaperResources/Sources/WallpaperResources.swift b/submodules/WallpaperResources/Sources/WallpaperResources.swift index 94a211b0eb..891f2d93f3 100644 --- a/submodules/WallpaperResources/Sources/WallpaperResources.swift +++ b/submodules/WallpaperResources/Sources/WallpaperResources.swift @@ -1312,7 +1312,7 @@ public func themeIconImage(account: Account, accountManager: AccountManager