diff options
author | lookshe <github@lookshe.org> | 2016-03-07 23:39:41 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-03-07 23:39:41 +0100 |
commit | c8759af913b775645b5394eb3c1f08d8c5fe9238 (patch) | |
tree | 1bf91bf7f5120d91e7882553307904b3cd70a967 /src/main/java/eu | |
parent | 6578ecfe0e79c1d00d2282e05e28d5a4c950b687 (diff) |
Fixes FS#151 - Missing button on image-links
Diffstat (limited to 'src/main/java/eu')
4 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java index d9464f8c..0e79ea2c 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java @@ -64,7 +64,6 @@ public class PgpEngine { if (message.trusted() && message.treatAsDownloadable() != Message.Decision.NEVER && ConversationsPlusPreferences.autoDownloadFileLink() - && mXmppConnectionService.isDownloadAllowedInConnection() && ConversationsPlusPreferences.autoAcceptFileSize() > 0) { manager.createNewDownloadConnection(message); } diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 1470d250..b47ff96c 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -184,7 +184,9 @@ public class HttpDownloadConnection implements Transferable { return; } file.setExpectedSize(size); - if (size != -1 && size <= ConversationsPlusPreferences.autoAcceptFileSize()) { + if (size != -1 + && size <= ConversationsPlusPreferences.autoAcceptFileSize() + && mXmppConnectionService.isDownloadAllowedInConnection()) { HttpDownloadConnection.this.acceptedAutomatically = true; new Thread(new FileDownloader(interactive)).start(); } else { diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 34f24f6f..ca821ce2 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -444,8 +444,7 @@ public class MessageParser extends AbstractParser implements if (message.trusted() && message.treatAsDownloadable() != Message.Decision.NEVER && ConversationsPlusPreferences.autoAcceptFileSize() > 0 - && ConversationsPlusPreferences.autoDownloadFileLink() - && mXmppConnectionService.isDownloadAllowedInConnection()) { + && ConversationsPlusPreferences.autoDownloadFileLink()) { manager.createNewDownloadConnection(message); } else { if (query == null) { diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 052f59c6..26e6d44d 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -366,7 +366,8 @@ public class JingleConnection implements Transferable { conversation.add(message); mXmppConnectionService.updateConversationUi(); if (mJingleConnectionManager.hasStoragePermission() - && size < ConversationsPlusPreferences.autoAcceptFileSize()) { + && size <= ConversationsPlusPreferences.autoAcceptFileSize() + && mXmppConnectionService.isDownloadAllowedInConnection()) { Logging.d(Config.LOGTAG, "auto accepting file from "+ packet.getFrom()); this.acceptedAutomatically = true; this.sendAccept(); |