mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 12:25:11 +00:00
fix: Blurhash crashes on height 0
This commit is contained in:
parent
e76781a24b
commit
5f94ecf1a0
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue