refactor: Make notification avatars rounded

This commit is contained in:
krille-chan 2025-07-12 15:38:04 +02:00
commit 9643242cc8
No known key found for this signature in database
2 changed files with 49 additions and 6 deletions

View file

@ -50,7 +50,7 @@ extension LocalNotificationsExtension on MatrixState {
Uri? thumbnailUri;
if (avatarUrl != null) {
const size = 64;
const size = 128;
const thumbnailMethod = ThumbnailMethod.crop;
// Pre-cache so that we can later just set the thumbnail uri as icon:
await client.downloadMxcCached(
@ -59,6 +59,7 @@ extension LocalNotificationsExtension on MatrixState {
height: size,
thumbnailMethod: thumbnailMethod,
isThumbnail: true,
rounded: true,
);
thumbnailUri =
@ -92,6 +93,7 @@ extension LocalNotificationsExtension on MatrixState {
height: size,
thumbnailMethod: thumbnailMethod,
isThumbnail: true,
rounded: true,
);
final image = decodeImage(data);