From 8e4be5256ea5b4e47225a84604720a15b45d3f39 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 4 Mar 2014 02:51:01 +0100 Subject: Muc Options even more awesome --- src/eu/siacs/conversations/entities/MucOptions.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/eu/siacs/conversations/entities') diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java index b3b53e1da..add56fb66 100644 --- a/src/eu/siacs/conversations/entities/MucOptions.java +++ b/src/eu/siacs/conversations/entities/MucOptions.java @@ -3,6 +3,7 @@ package eu.siacs.conversations.entities; import java.util.ArrayList; import java.util.List; +import eu.siacs.conversations.entities.MucOptions.User; import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xmpp.PresencePacket; import android.annotation.SuppressLint; @@ -75,6 +76,7 @@ public class MucOptions { private boolean isOnline = false; private int error = 0; private OnRenameListener renameListener = null; + private User self = new User(); public void deleteUser(String name) { @@ -107,12 +109,14 @@ public class MucOptions { user.setAffiliation(item.getAttribute("affiliation")); user.setRole(item.getAttribute("role")); user.setName(name); - addUser(user); Log.d("xmppService","nick: "+getNick()); Log.d("xmppService","name: "+name); if (name.equals(getNick())) { this.isOnline = true; this.error = 0; + self = user; + } else { + addUser(user); } } else if (type.equals("unavailable")) { Log.d("xmppService","name: "+name); @@ -179,4 +183,8 @@ public class MucOptions { this.error = 0; this.isOnline = false; } + + public User getSelf() { + return self; + } } \ No newline at end of file -- cgit v1.2.3