mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Do not show profile name changes if names are visually identical.
Fixes #9860
This commit is contained in:
@@ -13,6 +13,8 @@ import org.thoughtcrime.securesms.util.StringUtil;
|
||||
import org.thoughtcrime.securesms.util.cjkv.CJKVUtil;
|
||||
import org.whispersystems.signalservice.api.crypto.ProfileCipher;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class ProfileName implements Parcelable {
|
||||
|
||||
public static final ProfileName EMPTY = new ProfileName("", "");
|
||||
@@ -133,6 +135,20 @@ public final class ProfileName implements Parcelable {
|
||||
dest.writeString(familyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
ProfileName that = (ProfileName) o;
|
||||
return Objects.equals(givenName, that.givenName) &&
|
||||
Objects.equals(familyName, that.familyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(givenName, familyName);
|
||||
}
|
||||
|
||||
public static final Creator<ProfileName> CREATOR = new Creator<ProfileName>() {
|
||||
@Override
|
||||
public ProfileName createFromParcel(Parcel in) {
|
||||
|
||||
Reference in New Issue
Block a user