From 97ca608f605ffeb70159e13b74a79badc9cf838e Mon Sep 17 00:00:00 2001 From: "h.carnot" Date: Wed, 6 Apr 2022 17:43:31 +0200 Subject: [PATCH] =?UTF-8?q?feat:=C2=A0check=20thumbnail=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/room.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/room.dart b/lib/src/room.dart index 6f4da2b6..ad1f0daf 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -758,6 +758,10 @@ class Room { compute: client.runInBackground, ); } + + if (thumbnail != null && file.size < thumbnail.size) { + thumbnail = null; // in this case, the thumbnail is not usefull + } } MatrixFile? uploadThumbnail =