aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/generator/IqGenerator.java2
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java23
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationsActivity.java3
3 files changed, 13 insertions, 15 deletions
diff --git a/src/main/java/de/pixart/messenger/generator/IqGenerator.java b/src/main/java/de/pixart/messenger/generator/IqGenerator.java
index 160496273..b2f43cbcf 100644
--- a/src/main/java/de/pixart/messenger/generator/IqGenerator.java
+++ b/src/main/java/de/pixart/messenger/generator/IqGenerator.java
@@ -358,7 +358,7 @@ public class IqGenerator extends AbstractGenerator {
return packet;
}
- public IqPacket destroyConference(Conversation conference) {
+ public IqPacket destroyRoom(Conversation conference) {
IqPacket packet = new IqPacket(IqPacket.TYPE.SET);
packet.setTo(conference.getJid().asBareJid());
packet.setFrom(conference.getAccount().getJid());
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index fbc355dfa..f36321b04 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -127,7 +127,6 @@ import de.pixart.messenger.utils.CryptoHelper;
import de.pixart.messenger.utils.ExceptionHelper;
import de.pixart.messenger.utils.MimeUtils;
import de.pixart.messenger.utils.Namespace;
-import de.pixart.messenger.utils.OnPhoneContactsLoadedListener;
import de.pixart.messenger.utils.PhoneHelper;
import de.pixart.messenger.utils.QuickLoader;
import de.pixart.messenger.utils.ReplacingSerialSingleThreadExecutor;
@@ -3084,29 +3083,29 @@ public class XmppConnectionService extends Service {
});
}
- public void destroyMuc(final Conversation mSelectedConversation) {
- destroyConference(mSelectedConversation, new XmppConnectionService.OnDestroyMuc() {
+ public void destroyRoom(final Conversation mSelectedConversation) {
+ destroyRoom(mSelectedConversation, new OnRoomDestroy() {
@Override
- public void OnDestroyMucSuccessful(int resId) {
+ public void onRoomDestroySucceeded(int resId) {
Log.d(Config.LOGTAG, "Destroy succeed");
showErrorToastInUi(resId);
}
@Override
- public void OnDestroyMucFailed(int resId) {
+ public void onRoomDestroyFailed(int resId) {
Log.d(Config.LOGTAG, "Destroy failed");
showErrorToastInUi(resId);
}
});
}
- public void destroyConference(final Conversation conference, final OnDestroyMuc callback) {
- IqPacket request = this.mIqGenerator.destroyConference(conference);
+ public void destroyRoom(final Conversation conference, final OnRoomDestroy callback) {
+ IqPacket request = this.mIqGenerator.destroyRoom(conference);
sendIqPacket(conference.getAccount(), request, (account, packet) -> {
if (packet.getType() == IqPacket.TYPE.RESULT) {
- callback.OnDestroyMucSuccessful(R.string.destroy_muc_succeed);
+ callback.onRoomDestroySucceeded(R.string.destroy_muc_succeed);
} else {
- callback.OnDestroyMucFailed(R.string.destroy_muc_failed);
+ callback.onRoomDestroyFailed(R.string.destroy_muc_failed);
}
});
}
@@ -4581,10 +4580,10 @@ public class XmppConnectionService extends Service {
void onRoleChangeFailed(String nick, int resid);
}
- public interface OnDestroyMuc {
- void OnDestroyMucSuccessful(int resId);
+ public interface OnRoomDestroy {
+ void onRoomDestroySucceeded(int resId);
- void OnDestroyMucFailed(int resId);
+ void onRoomDestroyFailed(int resId);
}
public interface OnConversationUpdate {
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
index 3384cbd0e..2332db1b0 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
@@ -76,7 +76,6 @@ import de.pixart.messenger.entities.Conversation;
import de.pixart.messenger.entities.MucOptions;
import de.pixart.messenger.entities.Presence;
import de.pixart.messenger.services.EmojiService;
-import de.pixart.messenger.services.UpdateService;
import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.ui.interfaces.OnBackendConnected;
import de.pixart.messenger.ui.interfaces.OnConversationArchived;
@@ -619,7 +618,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
Log.d(Config.LOGTAG, "Get " + intent.getAction() + " intent for " + extras.getString("MUC_UUID"));
Conversation conversation = xmppConnectionService.findConversationByUuid(extras.getString("MUC_UUID"));
ConversationsActivity.this.xmppConnectionService.clearConversationHistory(conversation);
- xmppConnectionService.destroyMuc(conversation);
+ xmppConnectionService.destroyRoom(conversation);
endConversation(conversation);
}
}