fix: Blurhash crashes on height 0

This commit is contained in:
krille-chan 2023-11-19 09:40:26 +01:00
parent e76781a24b
commit 5f94ecf1a0
No known key found for this signature in database

View file

@ -52,8 +52,10 @@ class ImageBubble extends StatelessWidget {
var height = 32;
if (ratio > 1.0) {
height = (width / ratio).round();
if (height <= 0) height = 1;
} else {
width = (height * ratio).round();
if (width <= 0) width = 1;
}
return SizedBox(
width: this.width,