From ad6f51901ef099a5eb28fc6535a2ce4c3a1a17a7 Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Wed, 2 Jun 2021 20:30:26 -0300 Subject: [PATCH] Fix bad logic in chat color selection. --- .../org/thoughtcrime/securesms/recipients/Recipient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/recipients/Recipient.java b/app/src/main/java/org/thoughtcrime/securesms/recipients/Recipient.java index 1e925643f..fee47985a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recipients/Recipient.java +++ b/app/src/main/java/org/thoughtcrime/securesms/recipients/Recipient.java @@ -911,13 +911,13 @@ public class Recipient { } public @NonNull ChatColors getChatColors() { - if (chatColors != null && chatColors.getId() instanceof ChatColors.Id.Custom) { + if (chatColors != null && !(chatColors.getId() instanceof ChatColors.Id.Auto)) { return chatColors; - } if (chatColors != null && chatColors.getId() instanceof ChatColors.Id.Auto) { + } if (chatColors != null) { return getAutoChatColor(); } else { ChatColors global = SignalStore.chatColorsValues().getChatColors(); - if (global != null && global.getId() instanceof ChatColors.Id.Custom) { + if (global != null && !(global.getId() instanceof ChatColors.Id.Auto)) { return global; } else { return getAutoChatColor();