From 75a4008aee591d5ce1f3d560f5c1e378635419de Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 24 Mar 2023 15:07:24 +0100 Subject: [PATCH] use resource for consistent color gen (as per modernxmpp) --- .../android/util/ConsistentColorGeneration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/im/conversations/android/util/ConsistentColorGeneration.java b/app/src/main/java/im/conversations/android/util/ConsistentColorGeneration.java index ad9fc6454..58d00afd2 100644 --- a/app/src/main/java/im/conversations/android/util/ConsistentColorGeneration.java +++ b/app/src/main/java/im/conversations/android/util/ConsistentColorGeneration.java @@ -53,7 +53,11 @@ public final class ConsistentColorGeneration { } public static int harmonized(final Context context, final Jid jid) { - return harmonized(context, jid.toString()); + if (jid.hasResource()) { + return harmonized(context, jid.getResourceOrEmpty().toString()); + } else { + return harmonized(context, jid.toString()); + } } @ColorInt