Fix send button

This commit is contained in:
Ilya Laktyushin 2021-09-08 02:19:13 +03:00
parent c110359f54
commit c3d4c8e2c5
2 changed files with 5 additions and 5 deletions

View File

@ -433,7 +433,7 @@ public struct PresentationResourcesChat {
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size))
let color: UIColor
if theme.referenceTheme.baseTheme == .night, theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
color = .white
} else {
color = theme.chat.inputPanel.actionControlForegroundColor
@ -470,7 +470,7 @@ public struct PresentationResourcesChat {
return generateImage(CGSize(width: 33.0, height: 33.0), rotatedContext: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size))
let color: UIColor
if theme.referenceTheme.baseTheme == .night, theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
color = .white
} else {
color = theme.chat.inputPanel.actionControlForegroundColor
@ -515,7 +515,7 @@ public struct PresentationResourcesChat {
context.translateBy(x: -imageRect.midX, y: -imageRect.midY)
let color: UIColor
if theme.referenceTheme.baseTheme == .night, theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
color = .white
} else {
color = theme.chat.inputPanel.actionControlForegroundColor

View File

@ -112,14 +112,14 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
self.backgroundNode.backgroundColor = theme.chat.inputPanel.actionControlFillColor
if theme.referenceTheme.baseTheme == .night, theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
if [.day, .night].contains(theme.referenceTheme.baseTheme) && theme.chat.message.outgoing.bubble.withWallpaper.fill.count > 1 {
self.backdropNode.isHidden = false
} else {
self.backdropNode.isHidden = true
}
let graphics = PresentationResourcesChat.principalGraphics(theme: theme, wallpaper: wallpaper, bubbleCorners: .init(mainRadius: 1, auxiliaryRadius: 1, mergeBubbleCorners: false))
self.backdropNode.setType(type: .outgoing(.None), theme: ChatPresentationThemeData(theme: theme, wallpaper: wallpaper), essentialGraphics: graphics, maskMode: true, backgroundNode: self.presentationContext?.backgroundNode)
self.backdropNode.setType(type: .outgoing(.None), theme: ChatPresentationThemeData(theme: theme, wallpaper: wallpaper), essentialGraphics: graphics, maskMode: false, backgroundNode: self.presentationContext?.backgroundNode)
}
private var absoluteRect: (CGRect, CGSize)?