Populate incoming attachments with width and height from message

This commit is contained in:
Moxie Marlinspike
2018-03-18 16:04:33 -07:00
parent 3c30db7edf
commit 9f8b4cf892
16 changed files with 111 additions and 28 deletions

View File

@@ -89,12 +89,9 @@ public abstract class PushSendJob extends SendJob {
.withLength(attachment.getSize())
.withFileName(attachment.getFileName())
.withVoiceNote(attachment.isVoiceNote())
.withListener(new ProgressListener() {
@Override
public void onAttachmentProgress(long total, long progress) {
EventBus.getDefault().postSticky(new PartProgressEvent(attachment, total, progress));
}
})
.withWidth(attachment.getWidth())
.withHeight(attachment.getHeight())
.withListener((total, progress) -> EventBus.getDefault().postSticky(new PartProgressEvent(attachment, total, progress)))
.build());
} catch (IOException ioe) {
Log.w(TAG, "Couldn't open attachment", ioe);