diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 11 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 6c2a3cfcd..f110b5fa8 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2892,11 +2892,12 @@ public class XmppConnectionService extends Service { }); } - public void destroyMuc(Conversation mSelectedConversation) { + public void destroyMuc(final Conversation mSelectedConversation) { destroyConference(mSelectedConversation, new XmppConnectionService.OnDestroyMuc() { @Override - public void OnDestroyMucSuccessful() { + public void OnDestroyMucSuccessful(int resId) { Log.d(Config.LOGTAG, "Destroy succeed"); + showErrorToastInUi(resId); } @Override @@ -2911,9 +2912,9 @@ public class XmppConnectionService extends Service { IqPacket request = this.mIqGenerator.destroyConference(conference); sendIqPacket(conference.getAccount(), request, (account, packet) -> { if (packet.getType() == IqPacket.TYPE.RESULT) { - callback.OnDestroyMucSuccessful(); + callback.OnDestroyMucSuccessful(R.string.destroy_muc_succeed); } else { - callback.OnDestroyMucFailed(R.string.failed); + callback.OnDestroyMucFailed(R.string.destroy_muc_failed); } }); } @@ -4286,7 +4287,7 @@ public class XmppConnectionService extends Service { } public interface OnDestroyMuc { - void OnDestroyMucSuccessful(); + void OnDestroyMucSuccessful(int resId); void OnDestroyMucFailed(int resId); } diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index f17380843..f0b20bfa4 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -60,7 +60,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers public void onClick(View v) { final AlertDialog.Builder DestroyMucDialog = new AlertDialog.Builder(ConferenceDetailsActivity.this); DestroyMucDialog.setNegativeButton(getString(R.string.cancel), null); - DestroyMucDialog.setTitle(getString(R.string.action_destroy_muc)); + DestroyMucDialog.setTitle(getString(R.string.destroy_muc)); DestroyMucDialog.setMessage(getString(R.string.destroy_muc_text, mConversation.getName())); DestroyMucDialog.setPositiveButton(getString(R.string.delete), (dialogInterface, i) -> { Intent intent = new Intent(xmppConnectionService, ConversationActivity.class); |