From e459ea0288de4ff04b980b23fb18a595112b017d Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Fri, 25 Jun 2021 15:57:43 +1000 Subject: [PATCH 1/2] fix overflow menu background color --- app/src/main/res/values/themes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 5928d5687f..110ac1dfe2 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -18,7 +18,7 @@ @color/default_background_start @color/compose_view_background - @style/ThemeOverlay.AppCompat.Light + @style/ThemeOverlay.AppCompat.DayNight @null @style/ThemeOverlay.AppCompat.DayNight.ActionBar @style/Widget.Session.ActionBar From 2b26876c4c7437b974110876cec3f4c33c68501a Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Mon, 28 Jun 2021 09:56:49 +1000 Subject: [PATCH 2/2] fix text color for system default dark mode --- .../conversation/v2/messages/VisibleMessageContentView.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt index da12568ed4..e242d6e6b5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt @@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.conversation.v2.messages import android.content.Context import android.content.res.ColorStateList +import android.graphics.Color import android.graphics.drawable.Drawable import android.text.util.Linkify import android.util.AttributeSet @@ -141,11 +142,11 @@ class VisibleMessageContentView : LinearLayout { @ColorInt fun getTextColor(context: Context, message: MessageRecord): Int { - val uiMode = UiModeUtilities.getUserSelectedUiMode(context) + val isDayUiMode = UiModeUtilities.isDayUiMode(context) val colorID = if (message.isOutgoing) { - if (uiMode == UiMode.NIGHT) R.color.black else R.color.white + if (isDayUiMode) R.color.white else R.color.black } else { - if (uiMode == UiMode.NIGHT) R.color.white else R.color.black + if (isDayUiMode) R.color.black else R.color.white } return context.resources.getColorWithID(colorID, context.theme) }