mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Fix bug where video dimensions aren't always correct in chat view.
This commit is contained in:
committed by
Cody Henthorne
parent
d28fc98cfd
commit
08509f6693
@@ -2099,12 +2099,15 @@ class AttachmentTable(
|
||||
val contentValues = contentValuesOf(
|
||||
DATA_SIZE to newDataFileInfo.length,
|
||||
CONTENT_TYPE to mediaStream.mimeType,
|
||||
WIDTH to mediaStream.width,
|
||||
HEIGHT to mediaStream.height,
|
||||
DATA_FILE to newDataFileInfo.file.absolutePath,
|
||||
DATA_RANDOM to newDataFileInfo.random
|
||||
)
|
||||
|
||||
if (mediaStream.width > 0 && mediaStream.height > 0) {
|
||||
contentValues.put(WIDTH, mediaStream.width)
|
||||
contentValues.put(HEIGHT, mediaStream.height)
|
||||
}
|
||||
|
||||
val updateCount = db.update(TABLE_NAME)
|
||||
.values(contentValues)
|
||||
.where("$ID = ? OR $DATA_FILE = ?", attachmentId.id, existingDataFileInfo.file.absolutePath)
|
||||
|
||||
Reference in New Issue
Block a user