diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-04-18 19:58:40 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-04-18 19:58:40 +0200 |
commit | ee0264d98c9a348ea29d12796bed25f9ba1494fb (patch) | |
tree | cc559348547e504d37a6efa7826ea0120070babe /src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java | |
parent | d94eb9309b4ab3ee1dfd3cee637b47a52223e15b (diff) | |
parent | 7df96caedbbb96a28d4f7e07fa2d159c8ca1373f (diff) |
Merge branch 'master' into introduce_cplus_database_version
Conflicts:
gradle/wrapper/gradle-wrapper.properties
src/main/res/values/strings.xml
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java index f068036b..301ba563 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java @@ -1311,10 +1311,6 @@ public class ConversationActivity extends XmppActivity } else if (requestCode == ATTACHMENT_CHOICE_CHOOSE_FILE || requestCode == ATTACHMENT_CHOICE_RECORD_VOICE) { final List<Uri> uris = extractUriFromIntent(data); final Conversation c = getSelectedConversation(); - final long max = c.getAccount() - .getXmppConnection() - .getFeatures() - .getMaxHttpUploadSize(); final OnPresenceSelected callback = new OnPresenceSelected() { @Override public void onPresenceSelected() { @@ -1328,7 +1324,7 @@ public class ConversationActivity extends XmppActivity } }; if (c.getMode() == Conversation.MODE_MULTI - || FileUtils.allFilesUnderSize(this, uris, max) + || FileUtils.allFilesUnderSize(this, uris, getMaxHttpUploadSize(c)) || c.getNextEncryption() == Message.ENCRYPTION_OTR) { callback.onPresenceSelected(); } else { @@ -1378,6 +1374,10 @@ public class ConversationActivity extends XmppActivity } } + private long getMaxHttpUploadSize(Conversation conversation) { + return conversation.getAccount().getXmppConnection().getFeatures().getMaxHttpUploadSize(); + } + private void openBatteryOptimizationDialogIfNeeded() { if (hasAccountWithoutPush() && isOptimizingBattery() |