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 width = double.tryParse(context.attributes['width'] ?? '');
|
||||||
final height = double.tryParse(context.attributes['height'] ?? '');
|
final height = double.tryParse(context.attributes['height'] ?? '');
|
||||||
|
|
||||||
|
final actualWidth = width ?? height ?? defaultDimension;
|
||||||
|
final actualHeight = height ?? width ?? defaultDimension;
|
||||||
|
|
||||||
return WidgetSpan(
|
return WidgetSpan(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: width ?? height ?? defaultDimension,
|
width: actualWidth,
|
||||||
height: height ?? width ?? defaultDimension,
|
height: actualHeight,
|
||||||
child: MxcImage(
|
child: MxcImage(
|
||||||
uri: mxcUrl,
|
uri: mxcUrl,
|
||||||
width: width ?? height ?? defaultDimension,
|
width: actualWidth,
|
||||||
height: height ?? width ?? defaultDimension,
|
height: actualHeight,
|
||||||
|
isThumbnail: (actualWidth * actualHeight) > (256 * 256),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ class _Reaction extends StatelessWidget {
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
animated: false,
|
animated: false,
|
||||||
|
isThumbnail: false,
|
||||||
),
|
),
|
||||||
if (count > 1) ...[
|
if (count > 1) ...[
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@ class InputBar extends StatelessWidget {
|
||||||
: null,
|
: null,
|
||||||
width: size,
|
width: size,
|
||||||
height: size,
|
height: size,
|
||||||
|
isThumbnail: false,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Text(suggestion['name']!),
|
Text(suggestion['name']!),
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
||||||
width: 128,
|
width: 128,
|
||||||
height: 128,
|
height: 128,
|
||||||
animated: true,
|
animated: true,
|
||||||
|
isThumbnail: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@ class _EmoteImage extends StatelessWidget {
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
width: size,
|
width: size,
|
||||||
height: size,
|
height: size,
|
||||||
|
isThumbnail: false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue