aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-24 13:36:06 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-06-24 13:36:06 +0200
commit78e3afc1af6b96d37d3f488af0481ec016823925 (patch)
tree2d0d75897702b500d451faf85424b0c9a944c95f /src/main/java/eu/siacs
parentd2ca0c7fe873035fce326d8001a2084c23d73a52 (diff)
show error toasts on ui thread
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index e328084f..0ed35049 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -1464,13 +1464,20 @@ public class ConversationActivity extends XmppActivity
}
@Override
- public void error(int errorCode, Message message) {
- replaceToast(getString(errorCode));
+ public void error(final int errorCode, Message message) {
+ hidePrepareFileToast(prepareFileToast);
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ replaceToast(getString(errorCode));
+ }
+ });
+
}
@Override
public void userInputRequried(PendingIntent pi, Message message) {
-
+ hidePrepareFileToast(prepareFileToast);
}
});
}
@@ -1496,8 +1503,14 @@ public class ConversationActivity extends XmppActivity
}
@Override
- public void error(int error, Message message) {
- replaceToast(getString(error));
+ public void error(final int error, Message message) {
+ hidePrepareFileToast(prepareFileToast);
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ replaceToast(getString(error));
+ }
+ });
}
});
}