diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-06-24 13:36:06 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-24 20:22:59 +0200 |
commit | ae5fbb9e02435384a91a47e204c65b0925be2f35 (patch) | |
tree | 958140a708e27a8977ed0d51afa385ec4e03b8e5 /src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | |
parent | 3c925d64b47f7ba9d3b1bcf2609450669b299006 (diff) |
show error toasts on ui thread
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/ConversationActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 23 |
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 f403d7389..843a8ad1d 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1682,13 +1682,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); } }); } @@ -1714,8 +1721,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)); + } + }); } }); } |