show self contact with display name
This commit is contained in:
parent
eea484af01
commit
9db0808306
|
@ -7,6 +7,8 @@ import android.net.Uri;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -131,6 +133,12 @@ public class Contact implements ListItem, Blockable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
|
if (isSelf()) {
|
||||||
|
final String displayName = account.getDisplayName();
|
||||||
|
if (!Strings.isNullOrEmpty(displayName)) {
|
||||||
|
return displayName;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Config.X509_VERIFICATION && !TextUtils.isEmpty(this.commonName)) {
|
if (Config.X509_VERIFICATION && !TextUtils.isEmpty(this.commonName)) {
|
||||||
return this.commonName;
|
return this.commonName;
|
||||||
} else if (!TextUtils.isEmpty(this.systemName)) {
|
} else if (!TextUtils.isEmpty(this.systemName)) {
|
||||||
|
|
Loading…
Reference in a new issue