show toast before finishing publish activity
This commit is contained in:
parent
a043ee6db6
commit
d59cc3b738
|
@ -37,8 +37,6 @@ import android.os.Bundle;
|
||||||
import android.support.annotation.StringRes;
|
import android.support.annotation.StringRes;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -52,13 +50,8 @@ import eu.siacs.conversations.ui.interfaces.OnAvatarPublication;
|
||||||
import eu.siacs.conversations.ui.util.PendingItem;
|
import eu.siacs.conversations.ui.util.PendingItem;
|
||||||
|
|
||||||
public class PublishGroupChatProfilePictureActivity extends XmppActivity implements OnAvatarPublication {
|
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 final PendingItem<String> pendingConversationUuid = new PendingItem<>();
|
||||||
|
private ActivityPublishProfilePictureBinding binding;
|
||||||
private Conversation conversation;
|
private Conversation conversation;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
||||||
|
@ -112,6 +105,8 @@ public class PublishGroupChatProfilePictureActivity extends XmppActivity impleme
|
||||||
|
|
||||||
|
|
||||||
private void publish(View view) {
|
private void publish(View view) {
|
||||||
|
binding.publishButton.setText(R.string.publishing);
|
||||||
|
binding.publishButton.setEnabled(false);
|
||||||
xmppConnectionService.publishMucAvatar(conversation, uri, this);
|
xmppConnectionService.publishMucAvatar(conversation, uri, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +138,10 @@ public class PublishGroupChatProfilePictureActivity extends XmppActivity impleme
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAvatarPublicationSucceeded() {
|
public void onAvatarPublicationSucceeded() {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
Toast.makeText(this, R.string.avatar_has_been_published, Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue