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,8 +53,12 @@ public final class ConsistentColorGeneration {
}
public static int harmonized(final Context context, final Jid jid) {
if (jid.hasResource()) {
return harmonized(context, jid.getResourceOrEmpty().toString());
} else {
return harmonized(context, jid.toString());
}
}
@ColorInt
private static int rgb(