Skip to content
Snippets Groups Projects
Commit 40feb505 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

MediaGallery: avoid exception if scale is 0

Change-Id: Id75a19411463866440cd03d6c9fb656c4320c5f1
parent b937f8e9
No related branches found
No related tags found
No related merge requests found
...@@ -151,7 +151,7 @@ class ConversationMediaGalleryAdapter( ...@@ -151,7 +151,7 @@ class ConversationMediaGalleryAdapter(
val scaleX = videoRatio / screenRatio val scaleX = videoRatio / screenRatio
if (scaleX >= 1f) { if (scaleX >= 1f) {
video.video.scaleX = scaleX video.video.scaleX = scaleX
} else { } else if (scaleX != 0f){
video.video.scaleY = 1f / scaleX video.video.scaleY = 1f / scaleX
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment