fix: dont use thumbnails for emoticons
This commit is contained in:
parent
325431c8f6
commit
98b4bec41b
5 changed files with 12 additions and 4 deletions
|
|
@ -272,14 +272,18 @@ class ImageExtension extends HtmlExtension {
|
|||
final width = double.tryParse(context.attributes['width'] ?? '');
|
||||
final height = double.tryParse(context.attributes['height'] ?? '');
|
||||
|
||||
final actualWidth = width ?? height ?? defaultDimension;
|
||||
final actualHeight = height ?? width ?? defaultDimension;
|
||||
|
||||
return WidgetSpan(
|
||||
child: SizedBox(
|
||||
width: width ?? height ?? defaultDimension,
|
||||
height: height ?? width ?? defaultDimension,
|
||||
width: actualWidth,
|
||||
height: actualHeight,
|
||||
child: MxcImage(
|
||||
uri: mxcUrl,
|
||||
width: width ?? height ?? defaultDimension,
|
||||
height: height ?? width ?? defaultDimension,
|
||||
width: actualWidth,
|
||||
height: actualHeight,
|
||||
isThumbnail: (actualWidth * actualHeight) > (256 * 256),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ class _Reaction extends StatelessWidget {
|
|||
width: 20,
|
||||
height: 20,
|
||||
animated: false,
|
||||
isThumbnail: false,
|
||||
),
|
||||
if (count > 1) ...[
|
||||
const SizedBox(width: 4),
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ class InputBar extends StatelessWidget {
|
|||
: null,
|
||||
width: size,
|
||||
height: size,
|
||||
isThumbnail: false,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(suggestion['name']!),
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
width: 128,
|
||||
height: 128,
|
||||
animated: true,
|
||||
isThumbnail: false,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -247,6 +247,7 @@ class _EmoteImage extends StatelessWidget {
|
|||
fit: BoxFit.contain,
|
||||
width: size,
|
||||
height: size,
|
||||
isThumbnail: false,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue