diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/PublishGroupChatProfilePictureActivity.java | 15 |
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); }); |