aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-27 20:16:42 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-27 20:16:42 +0100
commit68d8a7cf455517c34f90d1c721aa859d1fe25225 (patch)
treed4e316de692873e8092f4de88b74839ec1edb1b5 /src/main/java/de
parentb6be7415f6fe07f12d0f29b74384c144a9b66c1d (diff)
Show toast after destroying group chat
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java11
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java2
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);