From a456c3fa32aa206c1124ac71ecc98758e970f68e Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Mon, 17 Oct 2022 21:08:48 -0400 Subject: [PATCH] Fix invite banner background color in wallpaper conversations. --- .../conversation/ConversationParentFragment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationParentFragment.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationParentFragment.java index 73593f999b..d09b7f964d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationParentFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationParentFragment.java @@ -2170,7 +2170,9 @@ public class ConversationParentFragment extends Fragment int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorNeutralInverse); toolbar.setTitleTextColor(toolbarTextAndIconColor); setToolbarActionItemTint(toolbar, toolbarTextAndIconColor); - WindowUtil.setNavigationBarColor(requireActivity(), getResources().getColor(R.color.conversation_navigation_wallpaper)); + if (!smsExportStub.resolved()) { + WindowUtil.setNavigationBarColor(requireActivity(), getResources().getColor(R.color.conversation_navigation_wallpaper)); + } } else { wallpaper.setImageDrawable(null); wallpaperDim.setVisibility(View.GONE); @@ -2183,7 +2185,7 @@ public class ConversationParentFragment extends Fragment int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorOnSurface); toolbar.setTitleTextColor(toolbarTextAndIconColor); setToolbarActionItemTint(toolbar, toolbarTextAndIconColor); - if (!releaseChannelUnmute.resolved()) { + if (!releaseChannelUnmute.resolved() && !smsExportStub.resolved()) { WindowUtil.setNavigationBarColor(requireActivity(), getResources().getColor(R.color.signal_colorBackground)); } } @@ -2733,6 +2735,10 @@ public class ConversationParentFragment extends Fragment smsExportStub.setVisibility(View.VISIBLE); registerButton.setVisibility(View.GONE); + int color = ContextCompat.getColor(requireContext(), recipient.hasWallpaper() ? R.color.wallpaper_bubble_color : R.color.signal_colorBackground); + smsExportStub.get().setBackgroundColor(color); + WindowUtil.setNavigationBarColor(requireActivity(), color); + TextView message = smsExportStub.get().findViewById(R.id.export_sms_message); MaterialButton actionButton = smsExportStub.get().findViewById(R.id.export_sms_button); boolean isPhase1 = SignalStore.misc().getSmsExportPhase() == SmsExportPhase.PHASE_1;