aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-14 18:43:58 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-14 18:43:58 +0200
commitca7e24c30d74395fdf4007cad90733e7ec5db85a (patch)
treef036cdc876f6bbd71097a1b8dc19636cb31baf9e /src/eu/siacs/conversations/ui/ConversationActivity.java
parent08a26d27727bc723d638a60fa5589fa9e90b6af7 (diff)
hiding the prepare image toast after error or success
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 71710257..ac9328ca 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -384,7 +384,6 @@ public class ConversationActivity extends XmppActivity {
@Override
public void error(int error) {
displayErrorDialog(error);
-
}
});
} else {
@@ -728,21 +727,36 @@ public class ConversationActivity extends XmppActivity {
@Override
public void userInputRequried(PendingIntent pi) {
+ hidePrepareImageToast();
ConversationActivity.this.runIntent(pi, ConversationActivity.REQUEST_SEND_PGP_IMAGE);
}
@Override
public void success() {
sendPendingImageMessage();
+ hidePrepareImageToast();
}
@Override
public void error(int error) {
+ hidePrepareImageToast();
pendingMessage = null;
displayErrorDialog(error);
}
});
}
+
+ private void hidePrepareImageToast() {
+ if (prepareImageToast!=null) {
+ runOnUiThread(new Runnable() {
+
+ @Override
+ public void run() {
+ prepareImageToast.cancel();
+ }
+ });
+ }
+ }
private void sendPendingImageMessage() {
pendingMessage.getConversation().getMessages().add(pendingMessage);