From 741224209e5067610449d7f1df98cb558baae685 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 21:08:58 +0000 Subject: [PATCH 1/5] build: (deps): bump video_player from 2.10.0 to 2.10.1 Bumps [video_player](https://github.com/flutter/packages/tree/main/packages/video_player) from 2.10.0 to 2.10.1. - [Commits](https://github.com/flutter/packages/commits/video_player-v2.10.1/packages/video_player) --- updated-dependencies: - dependency-name: video_player dependency-version: 2.10.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 0a719fe83..e5be1e72a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2102,10 +2102,10 @@ packages: dependency: "direct main" description: name: video_player - sha256: "0d55b1f1a31e5ad4c4967bfaa8ade0240b07d20ee4af1dfef5f531056512961a" + sha256: "096bc28ce10d131be80dfb00c223024eb0fba301315a406728ab43dd99c45bdf" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.10.1" video_player_android: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9b48f9f7b..e7a41b3b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -85,7 +85,7 @@ dependencies: universal_html: ^2.2.4 url_launcher: ^6.3.2 video_compress: ^3.1.4 - video_player: ^2.9.5 + video_player: ^2.10.1 wakelock_plus: ^1.3.3 webrtc_interface: ^1.3.0 From b7e112a22464b2085639f3c170af6a681c7f8dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Wed, 12 Nov 2025 08:37:10 +0100 Subject: [PATCH 2/5] chore: Follow up notification actions --- lib/main.dart | 1 + lib/utils/background_push.dart | 15 +++++++++++++++ lib/utils/notification_background_handler.dart | 6 ++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 37e472add..00fe37474 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,6 +20,7 @@ ReceivePort? mainIsolateReceivePort; void main() async { if (PlatformInfos.isAndroid) { final port = mainIsolateReceivePort = ReceivePort(); + IsolateNameServer.removePortNameMapping('main_isolate'); IsolateNameServer.registerPortWithName( port.sendPort, 'main_isolate', diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 31b1e82e2..533bedfac 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -34,6 +34,7 @@ import 'package:unifiedpush/unifiedpush.dart'; import 'package:unifiedpush_ui/unifiedpush_ui.dart'; import 'package:fluffychat/l10n/l10n.dart'; +import 'package:fluffychat/main.dart'; import 'package:fluffychat/utils/notification_background_handler.dart'; import 'package:fluffychat/utils/push_helper.dart'; import 'package:fluffychat/widgets/fluffy_chat_app.dart'; @@ -77,6 +78,20 @@ class BackgroundPush { void _init() async { //firebaseEnabled = true; try { + mainIsolateReceivePort?.listen( + (message) async { + try { + await notificationTap( + NotificationResponseJson.fromJsonString(message), + client: client, + router: FluffyChatApp.router, + l10n: l10n, + ); + } catch (e, s) { + Logs().wtf('Main Notification Tap crashed', e, s); + } + }, + ); if (PlatformInfos.isAndroid) { final port = ReceivePort(); IsolateNameServer.removePortNameMapping('background_tab_port'); diff --git a/lib/utils/notification_background_handler.dart b/lib/utils/notification_background_handler.dart index 32113502a..a0fcd4792 100644 --- a/lib/utils/notification_background_handler.dart +++ b/lib/utils/notification_background_handler.dart @@ -46,13 +46,15 @@ extension NotificationResponseJson on NotificationResponse { void notificationTapBackground( NotificationResponse notificationResponse, ) async { - Logs().i('Notification tap in background'); - final sendPort = IsolateNameServer.lookupPortByName('main_isolate'); if (sendPort != null) { sendPort.send(notificationResponse.toJsonString()); + Logs().i('Notification tap sent to main isolate!'); return; } + Logs().i( + 'Main isolate no up - Create temporary client for notification tap intend!', + ); if (!_vodInitialized) { await vod.init(); From 3c049211ca9c789c5861a4f81483f6d053ad0002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Wed, 12 Nov 2025 08:51:21 +0100 Subject: [PATCH 3/5] chore: Follow up notification action isolate handling --- lib/config/app_config.dart | 3 +++ lib/main.dart | 7 +++++-- .../notification_background_handler.dart | 20 ++++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 4f5d42c51..709ecc946 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -56,4 +56,7 @@ abstract class AppConfig { host: 'fluffy.chat', path: '/en/privacy', ); + + static const String mainIsolatePortName = 'main_isolate'; + static const String pushIsolatePortName = 'push_isolate'; } diff --git a/lib/main.dart b/lib/main.dart index 00fe37474..b09375b8a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,8 @@ import 'dart:isolate'; import 'dart:ui'; +import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/utils/notification_background_handler.dart'; import 'package:flutter/material.dart'; import 'package:collection/collection.dart'; @@ -20,11 +22,12 @@ ReceivePort? mainIsolateReceivePort; void main() async { if (PlatformInfos.isAndroid) { final port = mainIsolateReceivePort = ReceivePort(); - IsolateNameServer.removePortNameMapping('main_isolate'); + IsolateNameServer.removePortNameMapping(AppConfig.mainIsolatePortName); IsolateNameServer.registerPortWithName( port.sendPort, - 'main_isolate', + AppConfig.mainIsolatePortName, ); + await waitForPushIsolateDone(); } // Our background push shared isolate accesses flutter-internal things very early in the startup proccess diff --git a/lib/utils/notification_background_handler.dart b/lib/utils/notification_background_handler.dart index a0fcd4792..1a694615a 100644 --- a/lib/utils/notification_background_handler.dart +++ b/lib/utils/notification_background_handler.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:isolate'; import 'dart:ui'; import 'package:collection/collection.dart'; @@ -42,11 +43,20 @@ extension NotificationResponseJson on NotificationResponse { } } +Future waitForPushIsolateDone() async { + if (IsolateNameServer.lookupPortByName(AppConfig.pushIsolatePortName) != + null) { + Logs().i('Wait for Push Isolate to be done...'); + await Future.delayed(const Duration(milliseconds: 300)); + } +} + @pragma('vm:entry-point') void notificationTapBackground( NotificationResponse notificationResponse, ) async { - final sendPort = IsolateNameServer.lookupPortByName('main_isolate'); + final sendPort = + IsolateNameServer.lookupPortByName(AppConfig.mainIsolatePortName); if (sendPort != null) { sendPort.send(notificationResponse.toJsonString()); Logs().i('Notification tap sent to main isolate!'); @@ -56,6 +66,12 @@ void notificationTapBackground( 'Main isolate no up - Create temporary client for notification tap intend!', ); + final pushIsolateReceivePort = ReceivePort(); + IsolateNameServer.registerPortWithName( + pushIsolateReceivePort.sendPort, + AppConfig.pushIsolatePortName, + ); + if (!_vodInitialized) { await vod.init(); _vodInitialized = true; @@ -79,6 +95,8 @@ void notificationTapBackground( await notificationTap(notificationResponse, client: client); } finally { await client.dispose(closeDatabase: false); + pushIsolateReceivePort.sendPort.send('DONE'); + IsolateNameServer.removePortNameMapping(AppConfig.pushIsolatePortName); } return; } From 4f3629ccf4ec4288614ad28b497c32f2b14ae19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Wed, 12 Nov 2025 11:05:52 +0100 Subject: [PATCH 4/5] chore: Update matrix dart sdk --- lib/main.dart | 4 ++-- lib/pages/chat/events/message.dart | 10 ++++++---- lib/pages/homeserver_picker/homeserver_picker.dart | 2 +- pubspec.lock | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index b09375b8a..9f14baea1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,6 @@ import 'dart:isolate'; import 'dart:ui'; -import 'package:fluffychat/config/app_config.dart'; -import 'package:fluffychat/utils/notification_background_handler.dart'; import 'package:flutter/material.dart'; import 'package:collection/collection.dart'; @@ -11,7 +9,9 @@ import 'package:flutter_vodozemac/flutter_vodozemac.dart' as vod; import 'package:matrix/matrix.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/utils/client_manager.dart'; +import 'package:fluffychat/utils/notification_background_handler.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'config/setting_keys.dart'; import 'utils/background_push.dart'; diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index c55b1109f..15bf5814b 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -498,10 +498,12 @@ class Message extends StatelessWidget { CrossAxisAlignment .start, children: [ - if (RelationshipTypes - .reply == - event - .relationshipType) + if (event + .inReplyToEventId( + includingFallback: + false, + ) != + null) FutureBuilder( future: event .getReplyEvent( diff --git a/lib/pages/homeserver_picker/homeserver_picker.dart b/lib/pages/homeserver_picker/homeserver_picker.dart index 8f5e86148..dd050612a 100644 --- a/lib/pages/homeserver_picker/homeserver_picker.dart +++ b/lib/pages/homeserver_picker/homeserver_picker.dart @@ -79,7 +79,7 @@ class HomeserverPickerController extends State { homeserver = Uri.https(homeserverInput, ''); } final client = await Matrix.of(context).getLoginClient(); - final (_, _, loginFlows) = await client.checkHomeserver(homeserver); + final (_, _, loginFlows, _) = await client.checkHomeserver(homeserver); this.loginFlows = loginFlows; if (supportsSso && !legacyPasswordLogin) { if (!PlatformInfos.isMobile) { diff --git a/pubspec.lock b/pubspec.lock index ae5014069..2d37aa008 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1121,7 +1121,7 @@ packages: description: path: "." ref: main - resolved-ref: "9e26e5087a5811bcba5384e377a1b09a26badb89" + resolved-ref: "420346e1034e6ebf7860332a16fa8c327af046db" url: "https://github.com/famedly/matrix-dart-sdk.git" source: git version: "3.0.2" From 991b6a79cb98a71b1711a33906a7e183d33847aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:10:37 +0000 Subject: [PATCH 5/5] build: (deps): bump image_picker from 1.2.0 to 1.2.1 Bumps [image_picker](https://github.com/flutter/packages/tree/main/packages/image_picker) from 1.2.0 to 1.2.1. - [Commits](https://github.com/flutter/packages/commits/image_picker-v1.2.1/packages/image_picker) --- updated-dependencies: - dependency-name: image_picker dependency-version: 1.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 2d37aa008..c815bf20b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -883,10 +883,10 @@ packages: dependency: "direct main" description: name: image_picker - sha256: "736eb56a911cf24d1859315ad09ddec0b66104bc41a7f8c5b96b4e2620cf5041" + sha256: "784210112be18ea55f69d7076e2c656a4e24949fa9e76429fe53af0c0f4fa320" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" image_picker_android: dependency: transitive description: @@ -1129,10 +1129,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mgrs_dart: dependency: transitive description: @@ -1862,26 +1862,26 @@ packages: dependency: transitive description: name: test - sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb" + sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" url: "https://pub.dev" source: hosted - version: "1.26.2" + version: "1.26.3" test_api: dependency: transitive description: name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.6" + version: "0.7.7" test_core: dependency: transitive description: name: test_core - sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a" + sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0" url: "https://pub.dev" source: hosted - version: "0.6.11" + version: "0.6.12" timezone: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index dd842dda4..2040a6cf8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,7 +49,7 @@ dependencies: html: ^0.15.4 http: ^1.6.0 image: ^4.1.7 - image_picker: ^1.2.0 + image_picker: ^1.2.1 intl: any just_audio: ^0.10.5 latlong2: ^0.9.1