From 72907a64c4410e473bac261ed21646a4fada9f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Fri, 7 Nov 2025 12:11:52 +0100 Subject: [PATCH 1/5] chore: Update android locale config --- android/app/src/main/res/xml/locale_config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/app/src/main/res/xml/locale_config.xml b/android/app/src/main/res/xml/locale_config.xml index a37191e79..240911b54 100644 --- a/android/app/src/main/res/xml/locale_config.xml +++ b/android/app/src/main/res/xml/locale_config.xml @@ -50,6 +50,7 @@ + From a2c88af69b09c363babd68a5a5a48bee1a35ff2b Mon Sep 17 00:00:00 2001 From: krille-chan Date: Fri, 7 Nov 2025 16:31:23 +0100 Subject: [PATCH 2/5] build: Use secure storage from pub.dev again --- pubspec.lock | 19 +++++++++---------- pubspec.yaml | 7 ------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 2ac98caf8..e5f008463 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -601,14 +601,13 @@ packages: source: hosted version: "9.2.4" flutter_secure_storage_linux: - dependency: "direct overridden" + dependency: transitive description: - path: flutter_secure_storage_linux - ref: patch-2 - resolved-ref: f076cbb65b075afd6e3b648122987a67306dc298 - url: "https://github.com/m-berto/flutter_secure_storage.git" - source: git - version: "2.0.1" + name: flutter_secure_storage_linux + sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688 + url: "https://pub.dev" + source: hosted + version: "1.2.3" flutter_secure_storage_macos: dependency: transitive description: @@ -618,13 +617,13 @@ packages: source: hosted version: "3.1.3" flutter_secure_storage_platform_interface: - dependency: "direct overridden" + dependency: transitive description: name: flutter_secure_storage_platform_interface - sha256: b8337d3d52e429e6c0a7710e38cf9742a3bb05844bd927450eb94f80c11ef85d + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "1.1.2" flutter_secure_storage_web: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index bf9627b58..a5833ceb8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -123,13 +123,6 @@ flutter: # 2. Always link an (upstream?) issue # 3. Explain how and when this can be removed (overrides must be temporarily) dependency_overrides: - # https://github.com/juliansteenbakker/flutter_secure_storage/issues/920 - flutter_secure_storage_linux: - git: - url: https://github.com/m-berto/flutter_secure_storage.git - ref: patch-2 - path: flutter_secure_storage_linux - flutter_secure_storage_platform_interface: 2.0.0 # https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/155 flutter_web_auth_2: git: From 5ed33122b8251930f84cda7da71380a86a5e67bf Mon Sep 17 00:00:00 2001 From: krille-chan Date: Fri, 7 Nov 2025 16:39:22 +0100 Subject: [PATCH 3/5] build: Switch back to stable web auth package --- .../homeserver_picker/homeserver_picker.dart | 2 +- linux/flutter/generated_plugin_registrant.cc | 4 ++++ linux/flutter/generated_plugins.cmake | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ pubspec.lock | 23 ++++++++++++------- pubspec.yaml | 8 +------ .../flutter/generated_plugin_registrant.cc | 3 +++ windows/flutter/generated_plugins.cmake | 1 + 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/lib/pages/homeserver_picker/homeserver_picker.dart b/lib/pages/homeserver_picker/homeserver_picker.dart index 9a1768d20..8f5e86148 100644 --- a/lib/pages/homeserver_picker/homeserver_picker.dart +++ b/lib/pages/homeserver_picker/homeserver_picker.dart @@ -145,7 +145,7 @@ class HomeserverPickerController extends State { final result = await FlutterWebAuth2.authenticate( url: url.toString(), callbackUrlScheme: urlScheme, - options: const FlutterWebAuth2Options(), + options: FlutterWebAuth2Options(useWebview: PlatformInfos.isMobile), ); final token = Uri.parse(result).queryParameters['loginToken']; if (token?.isEmpty ?? false) return; diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 18556ce65..deccda1dc 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,6 +7,7 @@ #include "generated_plugin_registrant.h" #include +#include #include #include #include @@ -26,6 +27,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) desktop_drop_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin"); desktop_drop_plugin_register_with_registrar(desktop_drop_registrar); + g_autoptr(FlPluginRegistrar) desktop_webview_window_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopWebviewWindowPlugin"); + desktop_webview_window_plugin_register_with_registrar(desktop_webview_window_registrar); g_autoptr(FlPluginRegistrar) dynamic_color_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index caa16a27f..53413056c 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST desktop_drop + desktop_webview_window dynamic_color emoji_picker_flutter file_selector_linux diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 57246fde3..c1565959a 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,6 +8,7 @@ import Foundation import app_links import audio_session import desktop_drop +import desktop_webview_window import device_info_plus import dynamic_color import emoji_picker_flutter @@ -39,6 +40,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) + DesktopWebviewWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewWindowPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin")) diff --git a/pubspec.lock b/pubspec.lock index e5f008463..54d9ae883 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -329,6 +329,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.3" + desktop_webview_window: + dependency: transitive + description: + name: desktop_webview_window + sha256: "57cf20d81689d5cbb1adfd0017e96b669398a669d927906073b0e42fc64111c0" + url: "https://pub.dev" + source: hosted + version: "0.2.3" device_info_plus: dependency: "direct main" description: @@ -664,20 +672,19 @@ packages: flutter_web_auth_2: dependency: "direct main" description: - path: flutter_web_auth_2 - ref: "3.x-without-v1" - resolved-ref: "48682f19576001e50104a602d891343850adb67f" - url: "https://github.com/ThexXTURBOXx/flutter_web_auth_2.git" - source: git - version: "3.1.2-without-v1" + name: flutter_web_auth_2 + sha256: "3c14babeaa066c371f3a743f204dd0d348b7d42ffa6fae7a9847a521aff33696" + url: "https://pub.dev" + source: hosted + version: "4.1.0" flutter_web_auth_2_platform_interface: dependency: transitive description: name: flutter_web_auth_2_platform_interface - sha256: e8669e262005a8354389ba2971f0fc1c36188481234ff50d013aaf993f30f739 + sha256: c63a472c8070998e4e422f6b34a17070e60782ac442107c70000dd1bed645f4d url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.1.0" flutter_web_plugins: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index a5833ceb8..a846a98aa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: flutter_secure_storage: ^9.2.4 flutter_shortcuts_new: ^2.0.0 flutter_vodozemac: ^0.4.1 - flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379 + flutter_web_auth_2: ^4.1.0 flutter_webrtc: ^1.2.0 geolocator: ^14.0.2 go_router: ^17.0.0 @@ -123,9 +123,3 @@ flutter: # 2. Always link an (upstream?) issue # 3. Explain how and when this can be removed (overrides must be temporarily) dependency_overrides: - # https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/155 - flutter_web_auth_2: - git: - url: https://github.com/ThexXTURBOXx/flutter_web_auth_2.git - ref: 3.x-without-v1 - path: flutter_web_auth_2 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 80985b1f1..0e75c6434 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("AppLinksPluginCApi")); DesktopDropPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("DesktopDropPlugin")); + DesktopWebviewWindowPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("DesktopWebviewWindowPlugin")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); EmojiPickerFlutterPluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 382699d2c..307090774 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST app_links desktop_drop + desktop_webview_window dynamic_color emoji_picker_flutter file_selector_windows From 97fe704f5a395f983070b01caae0712a8bfd01ce Mon Sep 17 00:00:00 2001 From: krille-chan Date: Fri, 7 Nov 2025 16:59:47 +0100 Subject: [PATCH 4/5] chore: Scroll to unread thread if last message is from a thread --- lib/pages/chat/chat.dart | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 40e540f88..54f6010cc 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -354,7 +354,12 @@ class ChatController extends State ); sendingClient = Matrix.of(context).client; - readMarkerEventId = room.hasNewMessages ? room.fullyRead : ''; + final lastEventThreadId = + room.lastEvent?.relationshipType == RelationshipTypes.thread + ? room.lastEvent?.relationshipEventId + : null; + readMarkerEventId = + room.hasNewMessages ? lastEventThreadId ?? room.fullyRead : ''; WidgetsBinding.instance.addObserver(this); _tryLoadTimeline(); if (kIsWeb) { @@ -387,7 +392,11 @@ class ChatController extends State loadTimelineFuture = _getTimeline(); try { await loadTimelineFuture; - if (initialEventId != null) scrollToEventId(initialEventId); + // We launched the chat with a given initial event ID: + if (initialEventId != null) { + scrollToEventId(initialEventId); + return; + } var readMarkerEventIndex = readMarkerEventId.isEmpty ? -1 From 71ba074e7d124af16eb437ea6a082084faf78f77 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Fri, 7 Nov 2025 17:16:24 +0100 Subject: [PATCH 5/5] chore: Follow up threads in chat list --- lib/pages/chat_list/chat_list_item.dart | 53 ++++++++++++++++++++----- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 2fcb251a1..995a7eaa5 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -226,18 +226,53 @@ class ChatListItem extends StatelessWidget { ), const SizedBox(width: 4), ], - AnimatedContainer( - width: typingText.isEmpty ? 0 : 18, + AnimatedSize( clipBehavior: Clip.hardEdge, - decoration: const BoxDecoration(), duration: FluffyThemes.animationDuration, curve: FluffyThemes.animationCurve, - padding: const EdgeInsets.only(right: 4), - child: Icon( - Icons.edit_outlined, - color: theme.colorScheme.secondary, - size: 14, - ), + child: typingText.isNotEmpty + ? Padding( + padding: const EdgeInsets.only(right: 4.0), + child: Icon( + Icons.edit_outlined, + color: theme.colorScheme.secondary, + size: 16, + ), + ) + : room.lastEvent?.relationshipType == + RelationshipTypes.thread + ? Container( + decoration: BoxDecoration( + border: Border.all( + color: theme.colorScheme.outline, + ), + borderRadius: BorderRadius.circular( + AppConfig.borderRadius, + ), + ), + padding: + const EdgeInsets.symmetric(horizontal: 8.0), + margin: const EdgeInsets.only(right: 4.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.message_outlined, + size: 12, + color: theme.colorScheme.outline, + ), + const SizedBox(width: 4), + Text( + L10n.of(context).thread, + style: TextStyle( + fontSize: 12, + color: theme.colorScheme.outline, + ), + ), + ], + ), + ) + : const SizedBox.shrink(), ), Expanded( child: room.isSpace && room.membership == Membership.join