From 2ae9d24e39bb86a410831330532f79eb7b758d9f Mon Sep 17 00:00:00 2001 From: pranaysaini04 <128575315+pranaysaini04@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:31:35 +0530 Subject: [PATCH] By default status bar colour will be fetched from chat widget --- app/src/main/assets/applozic-settings.json | 2 +- .../conversation/activity/ConversationActivity.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/applozic-settings.json b/app/src/main/assets/applozic-settings.json index 7e3c60c26..0169fadbe 100644 --- a/app/src/main/assets/applozic-settings.json +++ b/app/src/main/assets/applozic-settings.json @@ -84,7 +84,7 @@ "toolbarTitleColor": "#ffffff", "toolbarSubtitleColor": "#ffffff", "toolbarColor": "", - "statusBarColor": "#ffffff", + "statusBarColor": "", "richMessageThemeColor": "", "restrictMessageTypingWithBots": false, "enableFaqOption": [ diff --git a/kommunicateui/src/main/java/com/applozic/mobicomkit/uiwidgets/conversation/activity/ConversationActivity.java b/kommunicateui/src/main/java/com/applozic/mobicomkit/uiwidgets/conversation/activity/ConversationActivity.java index 765415c5d..97f8d1b06 100755 --- a/kommunicateui/src/main/java/com/applozic/mobicomkit/uiwidgets/conversation/activity/ConversationActivity.java +++ b/kommunicateui/src/main/java/com/applozic/mobicomkit/uiwidgets/conversation/activity/ConversationActivity.java @@ -366,7 +366,11 @@ protected void onCreate(Bundle savedInstanceState) { customToolbarLayout = myToolbar.findViewById(R.id.custom_toolbar_root_layout); myToolbar.setBackgroundColor(KmThemeHelper.getInstance(this, alCustomizationSettings).getToolbarColor()); customToolbarLayout.setBackgroundColor(KmThemeHelper.getInstance(this, alCustomizationSettings).getToolbarColor()); - KmUtils.setStatusBarColor(this, KmThemeHelper.getInstance(this, alCustomizationSettings).getStatusBarColor()); + if (!alCustomizationSettings.getStatusBarColor().isEmpty()) { + KmUtils.setStatusBarColor(this, KmThemeHelper.getInstance(this, alCustomizationSettings).getStatusBarColor()); + } else { + KmUtils.setStatusBarColor(this, KmThemeHelper.getInstance(this, alCustomizationSettings).getPrimaryColor()); + } setSupportActionBar(myToolbar); setToolbarTitleSubtitleColorFromSettings();