From e8ee3722dbe3ab693b2381487ce4c22a9c30ed14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sat, 17 May 2025 16:29:32 +0200 Subject: [PATCH 1/2] chore: Follow up new video player --- lib/pages/chat/events/audio_player.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart index 9dff85028..5609c62d0 100644 --- a/lib/pages/chat/events/audio_player.dart +++ b/lib/pages/chat/events/audio_player.dart @@ -49,8 +49,8 @@ class AudioPlayerState extends State { AudioPlayerStatus status = AudioPlayerStatus.notDownloaded; late final MatrixState matrix; - late final List? _waveform; - late final String? _durationString; + List? _waveform; + String? _durationString; @override void dispose() { From 15543275c477484ddb388b6e4d4c21e49de9793f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sat, 17 May 2025 16:40:09 +0200 Subject: [PATCH 2/2] chore: Follow up push avatars --- lib/utils/client_download_content_extension.dart | 2 +- lib/utils/push_helper.dart | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) 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 33d0cce30..f0ee658bf 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -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 pushHelper( PushNotification notification, { Client? client, @@ -165,8 +167,8 @@ Future _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 _tryPushHelper( .downloadMxcCached( senderAvatar, thumbnailMethod: ThumbnailMethod.crop, - width: 128, - height: 128, + width: notificationAvatarDimension, + height: notificationAvatarDimension, animated: false, isThumbnail: true, rounded: true,