diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-02 18:07:38 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-02 18:07:38 +0200 |
commit | 701742f5500ade311741c8af59fcd73181a6e6f6 (patch) | |
tree | 062b4452e9f949120c9de35426529c5977838eba /src/main/java/eu/siacs/conversations/ui | |
parent | 2549ce89b0fac2a41c4de61c42d76e521875717f (diff) |
don't ask for resource when server uses http upload v0.1
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 3 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java | 6 |
2 files changed, 4 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 42252edec..184b5dc6b 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1317,8 +1317,7 @@ public class ConversationActivity extends XmppActivity } } }; - if (max <= 0 - || c.getMode() == Conversation.MODE_MULTI + if (c.getMode() == Conversation.MODE_MULTI || FileBackend.allFilesUnderSize(this, uris, max) || c.getNextEncryption() == Message.ENCRYPTION_OTR) { callback.onPresenceSelected(); diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java index 90333cfe4..8cd017bf6 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java @@ -296,10 +296,10 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer } }; if (account.httpUploadAvailable() - && ( - (share.image && !neverCompressPictures()) + && ((share.image && !neverCompressPictures()) || conversation.getMode() == Conversation.MODE_MULTI - || FileBackend.allFilesUnderSize(this, share.uris, max))) { + || FileBackend.allFilesUnderSize(this, share.uris, max)) + && conversation.getNextEncryption() != Message.ENCRYPTION_OTR) { callback.onPresenceSelected(); } else { selectPresence(conversation, callback); |