aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-06-29 22:14:21 +0200
committerChristian Schneppe <christian@pix-art.de>2018-06-29 22:14:21 +0200
commit298e5757cdfcdeacdd1d219ce314d52089fc2823 (patch)
tree74567d687e58efad2da8cdc75f06fe130fa9932a /src/main/java/de/pixart/messenger
parent1e360cbba5e9c98c92a0ed434210d6dba4f911ca (diff)
show toast before finishing publish activity
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java
index a4bf6b440..0a8ec2e7f 100644
--- a/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java
@@ -51,12 +51,8 @@ import de.pixart.messenger.ui.util.PendingItem;
public class PublishGroupChatProfilePictureActivity extends XmppActivity implements OnAvatarPublication {
- private static final int REQUEST_CHOOSE_FILE = 0xac24;
-
- private ActivityPublishProfilePictureBinding binding;
-
private final PendingItem<String> pendingConversationUuid = new PendingItem<>();
-
+ private ActivityPublishProfilePictureBinding binding;
private Conversation conversation;
private Uri uri;
@@ -110,6 +106,8 @@ public class PublishGroupChatProfilePictureActivity extends XmppActivity impleme
private void publish(View view) {
+ binding.publishButton.setText(R.string.publishing);
+ binding.publishButton.setEnabled(false);
xmppConnectionService.publishMucAvatar(conversation, uri, this);
}
@@ -141,13 +139,16 @@ public class PublishGroupChatProfilePictureActivity extends XmppActivity impleme
@Override
public void onAvatarPublicationSucceeded() {
- finish();
+ runOnUiThread(() -> {
+ Toast.makeText(this, R.string.avatar_has_been_published, Toast.LENGTH_SHORT).show();
+ finish();
+ });
}
@Override
public void onAvatarPublicationFailed(@StringRes int res) {
runOnUiThread(() -> {
- Toast.makeText(this,res,Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, res, Toast.LENGTH_SHORT).show();
this.binding.publishButton.setText(R.string.publish);
this.binding.publishButton.setEnabled(true);
});