diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-01-15 11:46:20 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-01-15 11:46:20 +0100 |
commit | 5c20a67e6687cd700e2c19291d1829254c043e07 (patch) | |
tree | 9ea5abe5916b96882fab637a1b23eab24929ed00 /src/main/java/de/pixart/messenger/xmpp/jingle | |
parent | 0ff3c0b3b446fef371d8d768f78e65fc993b3386 (diff) |
only call UI thread from downloading thread every 250ms
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp/jingle')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java index 29b9db382..c95359663 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java @@ -392,7 +392,7 @@ public class JingleConnection implements Transferable { long size = Long.parseLong(fileSize.getContent()); message.setBody(Long.toString(size)); conversation.add(message); - mXmppConnectionService.updateConversationUi(); + mJingleConnectionManager.updateConversationUi(true); if (mJingleConnectionManager.hasStoragePermission() && size < this.mJingleConnectionManager.getAutoAcceptFileSize() && mXmppConnectionService.isDataSaverDisabled()) { @@ -514,7 +514,7 @@ public class JingleConnection implements Transferable { private void sendAccept() { mJingleStatus = JINGLE_STATUS_ACCEPTED; this.mStatus = Transferable.STATUS_DOWNLOADING; - mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); this.mJingleConnectionManager.getPrimaryCandidate(this.account, new OnPrimaryCandidateFound() { @Override public void onPrimaryCandidateFound(boolean success, final JingleCandidate candidate) { @@ -846,7 +846,7 @@ public class JingleConnection implements Transferable { if (this.file != null) { file.delete(); } - this.mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); } else { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED); @@ -872,7 +872,7 @@ public class JingleConnection implements Transferable { if (this.file != null) { file.delete(); } - this.mXmppConnectionService.updateConversationUi(); + this.mJingleConnectionManager.updateConversationUi(true); } else { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED, @@ -1020,7 +1020,7 @@ public class JingleConnection implements Transferable { public void updateProgress(int i) { this.mProgress = i; - mXmppConnectionService.updateConversationUi(); + mJingleConnectionManager.updateConversationUi(false); } public String getTransportId() { |