chore: Follow up push avatars

pull/1865/head
Christian Kußowski 2 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) {
final image = decodeImage(imageData);
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/platform_infos.dart';
const notificationAvatarDimension = 128;
Future<void> pushHelper(
PushNotification notification, {
Client? client,
@ -165,8 +167,8 @@ Future<void> _tryPushHelper(
.downloadMxcCached(
avatar,
thumbnailMethod: ThumbnailMethod.crop,
width: 128,
height: 128,
width: notificationAvatarDimension,
height: notificationAvatarDimension,
animated: false,
isThumbnail: true,
rounded: true,
@ -184,8 +186,8 @@ Future<void> _tryPushHelper(
.downloadMxcCached(
senderAvatar,
thumbnailMethod: ThumbnailMethod.crop,
width: 128,
height: 128,
width: notificationAvatarDimension,
height: notificationAvatarDimension,
animated: false,
isThumbnail: true,
rounded: true,

Loading…
Cancel
Save