From c0993a9acb7be045d75e1c1dcc4c0fafc879a31e Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 15 Jan 2015 16:26:46 +0100 Subject: [PATCH] show toast when avatar has been published - fixed #874 --- .../ui/PublishProfilePictureActivity.java | 26 +++++++++---------- src/main/res/values/strings.xml | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java index 10ee0cd5..2ba0b090 100644 --- a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java @@ -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 avatarPublication = new UiCallback() { @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); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 883a41e7..f35b59ca 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -442,4 +442,5 @@ Received %s Disable foreground service Touch to open Conversations + Avatar has been published!