chore: Follow up push avatars

pull/1865/head
Christian Kußowski 3 months ago
parent e8ee3722db
commit 15543275c4
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -51,7 +51,7 @@ extension ClientDownloadContentExtension on Client {
if (rounded) { if (rounded) {
final image = decodeImage(imageData); final image = decodeImage(imageData);
if (image != null) { if (image != null) {
imageData = copyCropCircle(image).toUint8List(); imageData = encodePng(copyCropCircle(image));
} }
} }

@ -17,6 +17,8 @@ import 'package:fluffychat/utils/client_manager.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/platform_infos.dart';
const notificationAvatarDimension = 128;
Future<void> pushHelper( Future<void> pushHelper(
PushNotification notification, { PushNotification notification, {
Client? client, Client? client,
@ -165,8 +167,8 @@ Future<void> _tryPushHelper(
.downloadMxcCached( .downloadMxcCached(
avatar, avatar,
thumbnailMethod: ThumbnailMethod.crop, thumbnailMethod: ThumbnailMethod.crop,
width: 128, width: notificationAvatarDimension,
height: 128, height: notificationAvatarDimension,
animated: false, animated: false,
isThumbnail: true, isThumbnail: true,
rounded: true, rounded: true,
@ -184,8 +186,8 @@ Future<void> _tryPushHelper(
.downloadMxcCached( .downloadMxcCached(
senderAvatar, senderAvatar,
thumbnailMethod: ThumbnailMethod.crop, thumbnailMethod: ThumbnailMethod.crop,
width: 128, width: notificationAvatarDimension,
height: 128, height: notificationAvatarDimension,
animated: false, animated: false,
isThumbnail: true, isThumbnail: true,
rounded: true, rounded: true,

Loading…
Cancel
Save