From 422e94ab45ba0329afe3ae2ac9a7f9a4e5930860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 28 Oct 2025 07:25:55 +0100 Subject: [PATCH 1/4] fix: Notifications on web not working when avatar could not be pre downloaded --- .../local_notifications_extension.dart | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/widgets/local_notifications_extension.dart b/lib/widgets/local_notifications_extension.dart index 0d0069fa4..873fdfc1a 100644 --- a/lib/widgets/local_notifications_extension.dart +++ b/lib/widgets/local_notifications_extension.dart @@ -53,14 +53,18 @@ extension LocalNotificationsExtension on MatrixState { const size = 128; const thumbnailMethod = ThumbnailMethod.crop; // Pre-cache so that we can later just set the thumbnail uri as icon: - await client.downloadMxcCached( - avatarUrl, - width: size, - height: size, - thumbnailMethod: thumbnailMethod, - isThumbnail: true, - rounded: true, - ); + try { + await client.downloadMxcCached( + avatarUrl, + width: size, + height: size, + thumbnailMethod: thumbnailMethod, + isThumbnail: true, + rounded: true, + ); + } catch (e, s) { + Logs().d('Unable to pre-download avatar for web notification', e, s); + } thumbnailUri = await event.senderFromMemoryOrFallback.avatarUrl?.getThumbnailUri( From 975ba31b4d461972d067f680fc6da9c27db3422a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 28 Oct 2025 07:38:54 +0100 Subject: [PATCH 2/4] chore: Better error handling for recording viewmodel --- lib/pages/chat/recording_view_model.dart | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/pages/chat/recording_view_model.dart b/lib/pages/chat/recording_view_model.dart index 4c3471008..ae5ca637f 100644 --- a/lib/pages/chat/recording_view_model.dart +++ b/lib/pages/chat/recording_view_model.dart @@ -33,7 +33,6 @@ class RecordingViewModelState extends State { Timer? _recorderSubscription; Duration duration = Duration.zero; - bool error = false; bool isSending = false; bool get isRecording => _audioRecorder != null; @@ -83,7 +82,11 @@ class RecordingViewModelState extends State { final result = await audioRecorder.hasPermission(); if (result != true) { - setState(() => error = true); + showOkAlertDialog( + context: context, + title: L10n.of(context).oopsSomethingWentWrong, + message: L10n.of(context).noPermission, + ); return; } await WakelockPlus.enable(); @@ -102,9 +105,14 @@ class RecordingViewModelState extends State { ); setState(() => duration = Duration.zero); _subscribe(); - } catch (_) { - setState(() => error = true); - rethrow; + } catch (e, s) { + Logs().w('Unable to start voice message recording', e, s); + showOkAlertDialog( + context: context, + title: L10n.of(context).oopsSomethingWentWrong, + message: e.toString(), + ); + setState(_reset); } } @@ -134,7 +142,6 @@ class RecordingViewModelState extends State { _audioRecorder?.stop(); _audioRecorder = null; isSending = false; - error = false; fileName = null; duration = Duration.zero; amplitudeTimeline.clear(); From f72ffb6b3ccdd3661fcdbb18a5b5a66f381245a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 28 Oct 2025 07:41:07 +0100 Subject: [PATCH 3/4] build: Update record to 6.1.2 --- pubspec.lock | 16 ++++++++-------- pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index e76e09dcd..ac856507e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1458,26 +1458,26 @@ packages: dependency: "direct main" description: name: record - sha256: "9dbc6ff3e784612f90a9b001373c45ff76b7a08abd2bd9fdf72c242320c8911c" + sha256: "6bad72fb3ea6708d724cf8b6c97c4e236cf9f43a52259b654efeb6fd9b737f1f" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.1.2" record_android: dependency: transitive description: name: record_android - sha256: "8361a791c9a3fa5c065f0b8b5adb10f12531f8538c86b19474cf7b56ea80d426" + sha256: fb54ee4e28f6829b8c580252a9ef49d9c549cfd263b0660ad7eeac0908658e9f url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.4" record_ios: dependency: transitive description: name: record_ios - sha256: "13e241ed9cbc220534a40ae6b66222e21288db364d96dd66fb762ebd3cb77c71" + sha256: "765b42ac1be019b1674ddd809b811fc721fe5a93f7bb1da7803f0d16772fd6d7" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.4" record_linux: dependency: transitive description: @@ -1490,10 +1490,10 @@ packages: dependency: transitive description: name: record_macos - sha256: "2849068bb59072f300ad63ed146e543d66afaef8263edba4de4834fc7c8d4d35" + sha256: "842ea4b7e95f4dd237aacffc686d1b0ff4277e3e5357865f8d28cd28bc18ed95" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" record_platform_interface: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 5bfb78459..77e5a3a0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,7 +66,7 @@ dependencies: qr_code_scanner_plus: ^2.0.13 qr_image: ^1.0.0 receive_sharing_intent: ^1.8.1 - record: ^6.1.1 + record: ^6.1.2 scroll_to_index: ^3.0.1 share_plus: ^12.0.1 shared_preferences: ^2.2.0 # Pinned because https://github.com/flutter/flutter/issues/118401 From 816c52630b55c8bb0fcfe520f4853a2f34747edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 28 Oct 2025 08:20:29 +0100 Subject: [PATCH 4/4] build: Update iOS build files --- ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Runner.xcodeproj/project.pbxproj | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 8c6e56146..d57061dd6 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 12.0 + 13.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 23a6d8624..8de7eea1d 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 77; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -389,14 +389,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; @@ -485,14 +481,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";