Fix bad logic in chat color selection.

fork-5.53.8
Alex Hart 2021-06-02 20:30:26 -03:00 zatwierdzone przez Cody Henthorne
rodzic 52ef4c6235
commit ad6f51901e
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -911,13 +911,13 @@ public class Recipient {
} }
public @NonNull ChatColors getChatColors() { public @NonNull ChatColors getChatColors() {
if (chatColors != null && chatColors.getId() instanceof ChatColors.Id.Custom) { if (chatColors != null && !(chatColors.getId() instanceof ChatColors.Id.Auto)) {
return chatColors; return chatColors;
} if (chatColors != null && chatColors.getId() instanceof ChatColors.Id.Auto) { } if (chatColors != null) {
return getAutoChatColor(); return getAutoChatColor();
} else { } else {
ChatColors global = SignalStore.chatColorsValues().getChatColors(); 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; return global;
} else { } else {
return getAutoChatColor(); return getAutoChatColor();