aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java16
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java2
2 files changed, 15 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 717102577..ac9328cad 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);
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index dc894ad5a..1fe7cf131 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -1,7 +1,5 @@
package eu.siacs.conversations.ui;
-import java.nio.channels.AlreadyConnectedException;
-
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Conversation;