Add option to not crop image previews (#2832)

* Don't crop image previews with aspects between 2:1 & 1:2

Fixes #1995

* Custom media preview layout for handling various aspect ratios
This commit is contained in:
Eva Tatarka 2022-12-01 12:20:46 -08:00 committed by GitHub
commit cc790ccf69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 402 additions and 298 deletions

View file

@ -68,7 +68,9 @@ data class Attachment(
@Parcelize
data class MetaData(
val focus: Focus?,
val duration: Float?
val duration: Float?,
val original: Size?,
val small: Size?,
) : Parcelable
/**
@ -82,4 +84,14 @@ data class Attachment(
val x: Float,
val y: Float
) : Parcelable
/**
* The size of an image, used to specify the width/height.
*/
@Parcelize
data class Size(
val width: Int,
val height: Int,
val aspect: Double
) : Parcelable
}