show toast when avatar has been published - fixed #874
This commit is contained in:
parent
994c9495ba
commit
c0993a9acb
|
@ -11,6 +11,8 @@ import android.view.View.OnLongClickListener;
|
|||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.utils.PhoneHelper;
|
||||
|
@ -31,13 +33,18 @@ public class PublishProfilePictureActivity extends XmppActivity {
|
|||
|
||||
private Uri avatarUri;
|
||||
private Uri defaultUri;
|
||||
private OnLongClickListener backToDefaultListener = new OnLongClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
avatarUri = defaultUri;
|
||||
loadImageIntoPreview(defaultUri);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
private Account account;
|
||||
|
||||
private boolean support = false;
|
||||
|
||||
private boolean mInitialAccountSetup;
|
||||
|
||||
private UiCallback<Avatar> avatarPublication = new UiCallback<Avatar>() {
|
||||
|
||||
@Override
|
||||
|
@ -50,6 +57,9 @@ public class PublishProfilePictureActivity extends XmppActivity {
|
|||
startActivity(new Intent(getApplicationContext(),
|
||||
StartConversationActivity.class));
|
||||
}
|
||||
Toast.makeText(PublishProfilePictureActivity.this,
|
||||
R.string.avatar_has_been_published,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
@ -75,16 +85,6 @@ public class PublishProfilePictureActivity extends XmppActivity {
|
|||
}
|
||||
};
|
||||
|
||||
private OnLongClickListener backToDefaultListener = new OnLongClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
avatarUri = defaultUri;
|
||||
loadImageIntoPreview(defaultUri);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
@ -442,4 +442,5 @@
|
|||
<string name="received_x_file">Received %s</string>
|
||||
<string name="disable_foreground_service">Disable foreground service</string>
|
||||
<string name="touch_to_open_conversations">Touch to open Conversations</string>
|
||||
<string name="avatar_has_been_published">Avatar has been published!</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue