mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
be conservative in sending videos
This commit is contained in:
parent
13c1c7a4f2
commit
a59f6fd69b
2 changed files with 31 additions and 17 deletions
|
@ -1025,18 +1025,22 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
if (action==ACTION_SEND_OUT) {
|
||||
dcContext.setDraft(dcChat.getId(), null);
|
||||
|
||||
if(msg!=null) {
|
||||
if(msg!=null)
|
||||
{
|
||||
boolean doSend = true;
|
||||
if(recompress!=0) {
|
||||
|
||||
if(recompress==DcMsg.DC_MSG_IMAGE) {
|
||||
BitmapUtil.recodeImageMsg(ConversationActivity.this, msg);
|
||||
}
|
||||
else if(recompress==DcMsg.DC_MSG_VIDEO) {
|
||||
VideoRecoder.prepareVideo(ConversationActivity.this, dcChat.getId(), msg);
|
||||
doSend = VideoRecoder.prepareVideo(ConversationActivity.this, dcChat.getId(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
dcContext.sendMsg(dcChat.getId(), msg);
|
||||
if (doSend) {
|
||||
dcContext.sendMsg(dcChat.getId(), msg);
|
||||
}
|
||||
|
||||
Util.runOnMain(()-> sendComplete(dcChat.getId()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue