diff --git a/lib/utils/client_download_content_extension.dart b/lib/utils/client_download_content_extension.dart index f93d522f0..e159b7b8d 100644 --- a/lib/utils/client_download_content_extension.dart +++ b/lib/utils/client_download_content_extension.dart @@ -51,7 +51,7 @@ extension ClientDownloadContentExtension on Client { if (rounded) { final image = decodeImage(imageData); if (image != null) { - imageData = copyCropCircle(image).toUint8List(); + imageData = encodePng(copyCropCircle(image)); } } diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 91b23e479..c16bf02cf 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -18,6 +18,8 @@ import 'package:fluffychat/utils/client_manager.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart'; import 'package:fluffychat/utils/platform_infos.dart'; +const notificationAvatarDimension = 128; + Future pushHelper( PushNotification notification, { Client? client, @@ -166,8 +168,8 @@ Future _tryPushHelper( .downloadMxcCached( avatar, thumbnailMethod: ThumbnailMethod.crop, - width: 128, - height: 128, + width: notificationAvatarDimension, + height: notificationAvatarDimension, animated: false, isThumbnail: true, rounded: true, @@ -188,8 +190,8 @@ Future _tryPushHelper( .downloadMxcCached( senderAvatar, thumbnailMethod: ThumbnailMethod.crop, - width: 128, - height: 128, + width: notificationAvatarDimension, + height: notificationAvatarDimension, animated: false, isThumbnail: true, rounded: true,