use resource for consistent color gen (as per modernxmpp)

This commit is contained in:
Daniel Gultsch 2023-03-24 15:07:24 +01:00
parent 4fae8d4e11
commit 75a4008aee
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -53,7 +53,11 @@ public final class ConsistentColorGeneration {
} }
public static int harmonized(final Context context, final Jid jid) { 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 @ColorInt