mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-01 14:13:22 +01:00
Render images in a conversation true-to-size.
Previously, we were always rendering images as squares. Instead of doing that, we now render them as close to true-to-size as possible (within reasonable min/max width/height boundaries).
This commit is contained in:
committed by
Moxie Marlinspike
parent
9f8b4cf892
commit
ea374735e1
@@ -12,15 +12,15 @@ public class UriAttachment extends Attachment {
|
||||
public UriAttachment(@NonNull Uri uri, @NonNull String contentType, int transferState, long size,
|
||||
@Nullable String fileName, boolean voiceNote)
|
||||
{
|
||||
this(uri, uri, contentType, transferState, size, fileName, null, voiceNote);
|
||||
this(uri, uri, contentType, transferState, size, 0, 0, fileName, null, voiceNote);
|
||||
}
|
||||
|
||||
public UriAttachment(@NonNull Uri dataUri, @Nullable Uri thumbnailUri,
|
||||
@NonNull String contentType, int transferState, long size,
|
||||
@NonNull String contentType, int transferState, long size, int width, int height,
|
||||
@Nullable String fileName, @Nullable String fastPreflightId,
|
||||
boolean voiceNote)
|
||||
{
|
||||
super(contentType, transferState, size, fileName, null, null, null, null, fastPreflightId, voiceNote, 0, 0);
|
||||
super(contentType, transferState, size, fileName, null, null, null, null, fastPreflightId, voiceNote, width, height);
|
||||
this.dataUri = dataUri;
|
||||
this.thumbnailUri = thumbnailUri;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user