aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationFragment.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index ff372460..b64fe5b2 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -18,6 +18,7 @@ import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.MucOptions;
+import eu.siacs.conversations.entities.MucOptions.OnRenameListener;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.utils.PhoneHelper;
import eu.siacs.conversations.utils.UIHelper;
@@ -49,6 +50,7 @@ import android.widget.ListView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
+import android.widget.Toast;
public class ConversationFragment extends Fragment {
@@ -351,6 +353,25 @@ public class ConversationFragment extends Fragment {
Message.ENCRYPTION_PGP);
sendPgpMessage(message);
}
+ if (conversation.getMode() == Conversation.MODE_MULTI) {
+ activity.xmppConnectionService.setOnRenameListener(new OnRenameListener() {
+
+ @Override
+ public void onRename(final boolean success) {
+ getActivity().runOnUiThread(new Runnable() {
+
+ @Override
+ public void run() {
+ if (success) {
+ Toast.makeText(getActivity(), "Your nickname has been changed",Toast.LENGTH_SHORT).show();
+ } else {
+ Toast.makeText(getActivity(), "Nichname is already in use",Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ }
+ });
+ }
}
public void updateMessages() {