From bd938d59f07ace1fa00b6539f68b73794b350580 Mon Sep 17 00:00:00 2001 From: Aleksandr Chatsky Date: Fri, 13 Dec 2024 11:17:22 +0200 Subject: [PATCH] Fix grapish color for disabled input Issue introduced in https://github.com/salemove/android-sdk-widgets/pull/1183 --- .../src/main/java/com/glia/widgets/chat/ChatView.kt | 10 +++++----- ....chat_ChatViewSnapshotTest_failedAttachmentList.png | 4 ++-- ...failedAttachmentListWithUnifiedThemeWithoutChat.png | 4 ++-- ...ChatViewSnapshotTest_secureMessagingUnavailable.png | 4 ++-- ...Test_secureMessagingUnavailableWithUnifiedTheme.png | 4 ++-- ....widgets.chat_ChatViewSnapshotTest_transferring.png | 4 ++-- ...hotTest_transferringWithUnifiedThemeWithoutChat.png | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/widgetssdk/src/main/java/com/glia/widgets/chat/ChatView.kt b/widgetssdk/src/main/java/com/glia/widgets/chat/ChatView.kt index 4f8b50fc5..c3d335136 100644 --- a/widgetssdk/src/main/java/com/glia/widgets/chat/ChatView.kt +++ b/widgetssdk/src/main/java/com/glia/widgets/chat/ChatView.kt @@ -650,21 +650,21 @@ internal class ChatView(context: Context, attrs: AttributeSet?, defStyleAttr: In theme.systemNegativeColor?.let(::getColorCompat) ?.also(binding.scErrorLabel::setBackgroundColor) - theme.baseShadeColor?.let(::getColorCompat) + val disabledInputColor = theme.baseShadeColor?.let(::getColorCompat) ?.also(binding.chatDivider::setBackgroundColor) ?.also(binding.scBottomBannerDivider::setBackgroundColor) theme.baseDarkColor?.let(::getColorCompat) - ?.also{ binding.chatEditText.applyTextColor(it, theme.baseShadeColor) } + ?.also{ binding.chatEditText.applyTextColor(it, disabledInputColor) } theme.baseNormalColor?.let(::getColorCompat) - ?.also{ binding.chatEditText.applyHintColor(it, theme.baseShadeColor) } - ?.also{ binding.addAttachmentButton.applyImageColor(it, theme.baseShadeColor) } + ?.also{ binding.chatEditText.applyHintColor(it, disabledInputColor) } + ?.also{ binding.addAttachmentButton.applyImageColor(it, disabledInputColor) } ?.also(binding.scBottomBannerLabel::setTextColor) theme.systemAgentBubbleColor?.let(::getColorCompat)?.also(binding.scBottomBannerLabel::setBackgroundColor) // other theme.sendMessageButtonTintColor?.let(::getColorCompat) - ?.also { binding.sendButton.applyImageColor(it, theme.baseShadeColor) } + ?.also { binding.sendButton.applyImageColor(it, disabledInputColor) } theme.gliaChatBackgroundColor?.let(::getColorCompat)?.also(::setBackgroundColor) binding.gvaQuickRepliesLayout.updateTheme(theme) diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentList.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentList.png index f68806f0e..230b8f9cb 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentList.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentList.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be66affe88fbb8fc50a32c30d65601605c51b673f2f17f1e8df0b529126f06b9 -size 31418 +oid sha256:7d1ee0f0766ec327b529e1e6a3cf70f7519a23522bc88c2c8049e360ddb8705a +size 31389 diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentListWithUnifiedThemeWithoutChat.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentListWithUnifiedThemeWithoutChat.png index f68806f0e..230b8f9cb 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentListWithUnifiedThemeWithoutChat.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_failedAttachmentListWithUnifiedThemeWithoutChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be66affe88fbb8fc50a32c30d65601605c51b673f2f17f1e8df0b529126f06b9 -size 31418 +oid sha256:7d1ee0f0766ec327b529e1e6a3cf70f7519a23522bc88c2c8049e360ddb8705a +size 31389 diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailable.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailable.png index 0dc0d5d88..2f1996472 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailable.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailable.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58896a902887cfa23461c9501d24f46bd9ac914890eb296061c610c63d410834 -size 23845 +oid sha256:c5e867e83eef2cf6e55533ef802c16e450d9d3cbb186ab433171fe98398fa18c +size 23420 diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailableWithUnifiedTheme.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailableWithUnifiedTheme.png index fc939ad49..df5eedceb 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailableWithUnifiedTheme.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_secureMessagingUnavailableWithUnifiedTheme.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78f849bdad2595fb41c9bbefaa321ab774b1e2e71a3244b99d1b27db0f5908ef -size 93668 +oid sha256:5d8bf6debdeab7e097a1b50b37c9c5715f21c54d88ef18b18d4ba4937eaec14e +size 94311 diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferring.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferring.png index cac77e708..ed7783b74 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferring.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferring.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:878cb1b218adef442f348d5e0dc2d25a235b3614fcc919fdeb1b651e766fa58a -size 29975 +oid sha256:53b61399c4344576556c8af8b92232501c025e48586d7af68a0035f0690efd3e +size 29635 diff --git a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferringWithUnifiedThemeWithoutChat.png b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferringWithUnifiedThemeWithoutChat.png index cac77e708..ed7783b74 100644 --- a/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferringWithUnifiedThemeWithoutChat.png +++ b/widgetssdk/src/test/snapshots/images/com.glia.widgets.chat_ChatViewSnapshotTest_transferringWithUnifiedThemeWithoutChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:878cb1b218adef442f348d5e0dc2d25a235b3614fcc919fdeb1b651e766fa58a -size 29975 +oid sha256:53b61399c4344576556c8af8b92232501c025e48586d7af68a0035f0690efd3e +size 29635