Contact presenceName property
This commit is contained in:
parent
ec6220969d
commit
5b24534ab6
|
@ -32,6 +32,7 @@ public class Contact implements ListItem {
|
||||||
protected String accountUuid;
|
protected String accountUuid;
|
||||||
protected String systemName;
|
protected String systemName;
|
||||||
protected String serverName;
|
protected String serverName;
|
||||||
|
protected String presenceName;
|
||||||
protected String jid;
|
protected String jid;
|
||||||
protected int subscription = 0;
|
protected int subscription = 0;
|
||||||
protected String systemAccount;
|
protected String systemAccount;
|
||||||
|
@ -76,6 +77,8 @@ public class Contact implements ListItem {
|
||||||
return this.systemName;
|
return this.systemName;
|
||||||
} else if (this.serverName != null) {
|
} else if (this.serverName != null) {
|
||||||
return this.serverName;
|
return this.serverName;
|
||||||
|
} else if (this.presenceName != null) {
|
||||||
|
return this.presenceName;
|
||||||
} else {
|
} else {
|
||||||
return this.jid.split("@")[0];
|
return this.jid.split("@")[0];
|
||||||
}
|
}
|
||||||
|
@ -175,6 +178,10 @@ public class Contact implements ListItem {
|
||||||
this.systemName = systemName;
|
this.systemName = systemName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPresenceName(String presenceName) {
|
||||||
|
this.presenceName = presenceName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSystemAccount() {
|
public String getSystemAccount() {
|
||||||
return systemAccount;
|
return systemAccount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class PresenceParser extends AbstractParser implements
|
||||||
}
|
}
|
||||||
Element nick = packet.findChild("nick", "http://jabber.org/protocol/nick");
|
Element nick = packet.findChild("nick", "http://jabber.org/protocol/nick");
|
||||||
if (nick != null) {
|
if (nick != null) {
|
||||||
contact.setSystemName(nick.getContent());
|
contact.setPresenceName(nick.getContent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mXmppConnectionService.updateRosterUi();
|
mXmppConnectionService.updateRosterUi();
|
||||||
|
|
Loading…
Reference in New Issue