From fe4e2b94181f55a62b45bf3b2de8dff75eab6423 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 09:50:09 +0200 Subject: [PATCH 01/12] chore: Follow up open event from search --- lib/pages/chat/chat.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 2872f9b17..4c0405bb8 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -68,7 +68,7 @@ class ChatPage extends StatelessWidget { } return ChatPageWithRoom( - key: Key('chat_page_$roomId'), + key: Key('chat_page_${roomId}_$eventId'), room: room, shareText: shareText, eventId: eventId, @@ -278,10 +278,12 @@ class ChatController extends State } void _tryLoadTimeline() async { - readMarkerEventId = widget.eventId; - loadTimelineFuture = _getTimeline(eventContextId: readMarkerEventId); + final initialEventId = widget.eventId; + loadTimelineFuture = _getTimeline(); try { await loadTimelineFuture; + if (initialEventId != null) scrollToEventId(initialEventId); + final fullyRead = room.fullyRead; if (fullyRead.isEmpty) { setReadMarker(); From 9358ef2f40bd7e2ef191760a675652d56dbb7c8f Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 10:20:56 +0200 Subject: [PATCH 02/12] chore: Follow up deduplicate events --- lib/pages/chat_search/chat_search_page.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/pages/chat_search/chat_search_page.dart b/lib/pages/chat_search/chat_search_page.dart index c2b08d34d..f459ed9f9 100644 --- a/lib/pages/chat_search/chat_search_page.dart +++ b/lib/pages/chat_search/chat_search_page.dart @@ -70,6 +70,16 @@ class ChatSearchController extends State result.$2, ), ) + // Deduplication workaround for + // https://github.com/famedly/matrix-dart-sdk/issues/1831 + .map( + (result) => ( + { + for (final event in result.$1) event.eventId: event, + }.values.toList(), + result.$2, + ), + ) .asBroadcastStream(); }); } From 2084615df19e3687764ab236ce05710eaebc925c Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 10:39:00 +0200 Subject: [PATCH 03/12] chore: Follow up deduplicate gallery and file search --- lib/pages/chat_search/chat_search_page.dart | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/pages/chat_search/chat_search_page.dart b/lib/pages/chat_search/chat_search_page.dart index f459ed9f9..40109d0b6 100644 --- a/lib/pages/chat_search/chat_search_page.dart +++ b/lib/pages/chat_search/chat_search_page.dart @@ -110,6 +110,16 @@ class ChatSearchController extends State result.$2, ), ) + // Deduplication workaround for + // https://github.com/famedly/matrix-dart-sdk/issues/1831 + .map( + (result) => ( + { + for (final event in result.$1) event.eventId: event, + }.values.toList(), + result.$2, + ), + ) .asBroadcastStream(); }); } @@ -140,6 +150,16 @@ class ChatSearchController extends State result.$2, ), ) + // Deduplication workaround for + // https://github.com/famedly/matrix-dart-sdk/issues/1831 + .map( + (result) => ( + { + for (final event in result.$1) event.eventId: event, + }.values.toList(), + result.$2, + ), + ) .asBroadcastStream(); }); } From 5829446afa580793ad54dc3055776c6ba5052649 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 12:57:42 +0200 Subject: [PATCH 04/12] chore: Follow up missing null check --- lib/pages/chat/chat.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 4c0405bb8..2592f560c 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -289,7 +289,8 @@ class ChatController extends State setReadMarker(); return; } - if (timeline!.events.any((event) => event.eventId == fullyRead)) { + if (timeline?.events.any((event) => event.eventId == fullyRead) ?? + false) { Logs().v('Scroll up to visible event', fullyRead); setReadMarker(); return; From 147a741aefd773cf359d4603c110a53cc8884746 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 13:33:50 +0200 Subject: [PATCH 05/12] chore: Only load last event sender if necessary --- lib/pages/chat_list/chat_list_item.dart | 75 ++++++++++++++++--------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 4b2573a6f..65cbde378 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -89,6 +89,11 @@ class ChatListItem extends StatelessWidget { if (filter != null && !displayname.toLowerCase().contains(filter)) { return const SizedBox.shrink(); } + + final needLastEventSender = lastEvent == null + ? false + : room.getState(EventTypes.RoomMember, lastEvent.senderId) == null; + return Padding( padding: const EdgeInsets.symmetric( horizontal: 8, @@ -226,33 +231,49 @@ class ChatListItem extends StatelessWidget { maxLines: 1, softWrap: false, ) - : Text( - room.membership == Membership.invite - ? isDirectChat - ? L10n.of(context)!.invitePrivateChat - : L10n.of(context)!.inviteGroupChat - : room.lastEvent?.calcLocalizedBodyFallback( - MatrixLocals(L10n.of(context)!), - hideReply: true, - hideEdit: true, - plaintextBody: true, - removeMarkdown: true, - withSenderNamePrefix: !isDirectChat || - directChatMatrixId != - room.lastEvent?.senderId, - ) ?? - L10n.of(context)!.emptyChat, - softWrap: false, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: unread || room.hasNewMessages - ? FontWeight.bold - : null, - color: theme.colorScheme.onSurfaceVariant, - decoration: room.lastEvent?.redacted == true - ? TextDecoration.lineThrough - : null, + : FutureBuilder( + future: needLastEventSender + ? room.lastEvent?.calcLocalizedBody( + MatrixLocals(L10n.of(context)!), + hideReply: true, + hideEdit: true, + plaintextBody: true, + removeMarkdown: true, + withSenderNamePrefix: !isDirectChat || + directChatMatrixId != + room.lastEvent?.senderId, + ) + : null, + initialData: + room.lastEvent?.calcLocalizedBodyFallback( + MatrixLocals(L10n.of(context)!), + hideReply: true, + hideEdit: true, + plaintextBody: true, + removeMarkdown: true, + withSenderNamePrefix: !isDirectChat || + directChatMatrixId != + room.lastEvent?.senderId, + ), + builder: (context, snapshot) => Text( + room.membership == Membership.invite + ? isDirectChat + ? L10n.of(context)!.invitePrivateChat + : L10n.of(context)!.inviteGroupChat + : snapshot.data ?? + L10n.of(context)!.emptyChat, + softWrap: false, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: unread || room.hasNewMessages + ? FontWeight.bold + : null, + color: theme.colorScheme.onSurfaceVariant, + decoration: room.lastEvent?.redacted == true + ? TextDecoration.lineThrough + : null, + ), ), ), ), From b9b2d1799090b44075dc85749bb7d55e9a236a57 Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 28 May 2024 14:47:43 +0200 Subject: [PATCH 06/12] chore: Follow up last event --- lib/pages/chat_list/chat_list_item.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 65cbde378..e9e9ce17e 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -232,8 +232,9 @@ class ChatListItem extends StatelessWidget { softWrap: false, ) : FutureBuilder( + key: ValueKey(lastEvent?.senderId), future: needLastEventSender - ? room.lastEvent?.calcLocalizedBody( + ? lastEvent.calcLocalizedBody( MatrixLocals(L10n.of(context)!), hideReply: true, hideEdit: true, @@ -244,8 +245,7 @@ class ChatListItem extends StatelessWidget { room.lastEvent?.senderId, ) : null, - initialData: - room.lastEvent?.calcLocalizedBodyFallback( + initialData: lastEvent?.calcLocalizedBodyFallback( MatrixLocals(L10n.of(context)!), hideReply: true, hideEdit: true, From bfd8d7f99c173ef1569921b210d67742b140124f Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 29 May 2024 07:27:51 +0200 Subject: [PATCH 07/12] chore: Follow up update last event --- lib/pages/chat_list/chat_list_item.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index e9e9ce17e..965c73917 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -232,7 +232,7 @@ class ChatListItem extends StatelessWidget { softWrap: false, ) : FutureBuilder( - key: ValueKey(lastEvent?.senderId), + key: ValueKey(lastEvent?.eventId), future: needLastEventSender ? lastEvent.calcLocalizedBody( MatrixLocals(L10n.of(context)!), From 3d35a6adcf2df9d96e2f9a8ab9e0d7d7ea766c73 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 29 May 2024 11:20:32 +0200 Subject: [PATCH 08/12] refactor: Update to Matrix Dart SDK 0.29.9 --- assets/l10n/intl_en.arb | 4 +++- devtools_options.yaml | 3 +++ ios/Runner.xcodeproj/project.pbxproj | 18 ++++++++++++++++++ .../chat_access_settings_page.dart | 4 ++++ .../settings_ignore_list_view.dart | 10 ++++++++-- .../settings_notifications_view.dart | 12 +++++++----- .../settings_style/settings_style_view.dart | 12 ++++++++---- lib/widgets/chat_settings_popup_menu.dart | 10 ++++++++-- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 10 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 devtools_options.yaml diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 00f7356f5..721dee5b1 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2659,5 +2659,7 @@ "@thereAreCountUsersBlocked": { "type": "text", "count": {} - } + }, + "restricted": "Restricted", + "knockRestricted": "Knock restricted" } diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 000000000..fa0b357c4 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a6ce66d84..8d75b924a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -197,6 +197,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, F9C8EE392B9AB471149C306E /* [CP] Embed Pods Frameworks */, + 064CBD7CE0D4CD6850C6880A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -288,6 +289,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 064CBD7CE0D4CD6850C6880A /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/lib/pages/chat_access_settings/chat_access_settings_page.dart b/lib/pages/chat_access_settings/chat_access_settings_page.dart index 48d2d950c..7de6f3793 100644 --- a/lib/pages/chat_access_settings/chat_access_settings_page.dart +++ b/lib/pages/chat_access_settings/chat_access_settings_page.dart @@ -266,6 +266,10 @@ extension JoinRulesDisplayString on JoinRules { return l10n.usersMustKnock; case JoinRules.private: return l10n.noOneCanJoin; + case JoinRules.restricted: + return l10n.restricted; + case JoinRules.knockRestricted: + return l10n.knockRestricted; } } } diff --git a/lib/pages/settings_ignore_list/settings_ignore_list_view.dart b/lib/pages/settings_ignore_list/settings_ignore_list_view.dart index edd26312c..dee5e808a 100644 --- a/lib/pages/settings_ignore_list/settings_ignore_list_view.dart +++ b/lib/pages/settings_ignore_list/settings_ignore_list_view.dart @@ -62,8 +62,14 @@ class SettingsIgnoreListView extends StatelessWidget { ), Expanded( child: StreamBuilder( - stream: client.onAccountData.stream - .where((a) => a.type == 'm.ignored_user_list'), + stream: client.onSync.stream.where( + (syncUpdate) => + syncUpdate.accountData?.any( + (accountData) => + accountData.type == 'm.ignored_user_list', + ) ?? + false, + ), builder: (context, snapshot) { return ListView.builder( itemCount: client.ignoredUsers.length, diff --git a/lib/pages/settings_notifications/settings_notifications_view.dart b/lib/pages/settings_notifications/settings_notifications_view.dart index 978858a02..6c1d45cc5 100644 --- a/lib/pages/settings_notifications/settings_notifications_view.dart +++ b/lib/pages/settings_notifications/settings_notifications_view.dart @@ -22,11 +22,13 @@ class SettingsNotificationsView extends StatelessWidget { ), body: MaxWidthBody( child: StreamBuilder( - stream: Matrix.of(context) - .client - .onAccountData - .stream - .where((event) => event.type == 'm.push_rules'), + stream: Matrix.of(context).client.onSync.stream.where( + (syncUpdate) => + syncUpdate.accountData?.any( + (accountData) => accountData.type == 'm.push_rules', + ) ?? + false, + ), builder: (BuildContext context, _) { return Column( children: [ diff --git a/lib/pages/settings_style/settings_style_view.dart b/lib/pages/settings_style/settings_style_view.dart index 0286ff700..86f48fe87 100644 --- a/lib/pages/settings_style/settings_style_view.dart +++ b/lib/pages/settings_style/settings_style_view.dart @@ -205,10 +205,14 @@ class SettingsStyleView extends StatelessWidget { ), ), StreamBuilder( - stream: client.onAccountData.stream.where( - (data) => - data.type == - ApplicationAccountConfigExtension.accountDataKey, + stream: client.onSync.stream.where( + (syncUpdate) => + syncUpdate.accountData?.any( + (accountData) => + accountData.type == + ApplicationAccountConfigExtension.accountDataKey, + ) ?? + false, ), builder: (context, snapshot) { final accountConfig = client.applicationAccountConfig; diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index 23732aeb5..6d9a4ce57 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -37,9 +37,15 @@ class ChatSettingsPopupMenuState extends State { Widget build(BuildContext context) { notificationChangeSub ??= Matrix.of(context) .client - .onAccountData + .onSync .stream - .where((u) => u.type == 'm.push_rules') + .where( + (syncUpdate) => + syncUpdate.accountData?.any( + (accountData) => accountData.type == 'm.push_rules', + ) ?? + false, + ) .listen( (u) => setState(() {}), ); diff --git a/pubspec.lock b/pubspec.lock index e954dff85..532795288 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1210,10 +1210,10 @@ packages: dependency: "direct main" description: name: matrix - sha256: b96f16ec227138a61d148f2812c4d558b2930edbb6cd05d03b3a41c4fffd2f47 + sha256: "668ed9b7279ac9c364c687585e606c1122f88d6e2e3410ba781a167b47cd9471" url: "https://pub.dev" source: hosted - version: "0.29.7" + version: "0.29.9" meta: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 705c8fe52..17ad68c67 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,7 +64,7 @@ dependencies: keyboard_shortcuts: ^0.1.4 latlong2: ^0.9.1 linkify: ^5.0.0 - matrix: ^0.29.7 + matrix: ^0.29.9 native_imaging: ^0.1.1 package_info_plus: ^6.0.0 pasteboard: ^0.2.0 From 5f40393dd9052eff5585863efd3fe65fc44493ad Mon Sep 17 00:00:00 2001 From: krille-chan Date: Mon, 27 May 2024 21:19:36 +0200 Subject: [PATCH 09/12] build: Use correct pubspec.yaml format for hosted dependency --- pubspec.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 17ad68c67..3f7938580 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -152,9 +152,8 @@ dependency_overrides: # Until https://github.com/mogol/flutter_secure_storage/issues/616 is fixed flutter_secure_storage_linux: 1.1.3 geolocator_android: - hosted: - name: geolocator_android - url: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss + hosted: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss + version: ^1.0.1 # waiting for null safety # Upstream pull request: https://github.com/AntoineMarcel/keyboard_shortcuts/pull/13 keyboard_shortcuts: From d4da2dd431510d939890a374d9d8c057012f2431 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Wed, 29 May 2024 19:30:53 +0200 Subject: [PATCH 10/12] build: Use Flutter 3.19.6 for Linux --- .github/workflows/release.yaml | 2 +- lib/pages/chat/chat_view.dart | 3 +- lib/pages/chat/events/message.dart | 3 +- lib/pages/chat/typing_indicators.dart | 3 +- .../homeserver_picker/homeserver_app_bar.dart | 3 +- lib/pages/login/login_view.dart | 3 +- .../user_bottom_sheet_view.dart | 3 +- snap/snapcraft.yaml | 33 +++++++++++++++++-- 8 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6d2ba6360..1a0e42e8a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -110,7 +110,7 @@ jobs: - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ env.FLUTTER_VERSION }} + flutter-version: 3.19.6 # Workaround for not working on 3.22 cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev -y diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 9bf4932a1..9974a9e70 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -303,7 +303,8 @@ class ChatView extends StatelessWidget { clipBehavior: Clip.hardEdge, color: Theme.of(context) .colorScheme - .surfaceContainerHighest, + // ignore: deprecated_member_use + .surfaceVariant, borderRadius: const BorderRadius.all( Radius.circular(24), ), diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index 8e17de9de..cba2b9398 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -77,7 +77,8 @@ class Message extends StatelessWidget { final client = Matrix.of(context).client; final ownMessage = event.senderId == client.userID; final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; - var color = Theme.of(context).colorScheme.surfaceContainerHighest; + // ignore: deprecated_member_use + var color = Theme.of(context).colorScheme.surfaceVariant; final displayTime = event.type == EventTypes.RoomCreate || nextEvent == null || !event.originServerTs.sameEnvironment(nextEvent!.originServerTs); diff --git a/lib/pages/chat/typing_indicators.dart b/lib/pages/chat/typing_indicators.dart index 0eb2c0803..c30789fff 100644 --- a/lib/pages/chat/typing_indicators.dart +++ b/lib/pages/chat/typing_indicators.dart @@ -81,7 +81,8 @@ class TypingIndicators extends StatelessWidget { padding: const EdgeInsets.only(top: topPadding), child: Material( color: - Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + Theme.of(context).colorScheme.surfaceVariant, borderRadius: const BorderRadius.only( topLeft: Radius.circular(2), topRight: Radius.circular(AppConfig.borderRadius), diff --git a/lib/pages/homeserver_picker/homeserver_app_bar.dart b/lib/pages/homeserver_picker/homeserver_app_bar.dart index c5f3f6b01..8a1ad4e2b 100644 --- a/lib/pages/homeserver_picker/homeserver_app_bar.dart +++ b/lib/pages/homeserver_picker/homeserver_app_bar.dart @@ -93,7 +93,8 @@ class HomeserverAppBar extends StatelessWidget { : null, fillColor: FluffyThemes.isColumnMode(context) ? Theme.of(context).colorScheme.surface - : Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + : Theme.of(context).colorScheme.surfaceVariant, prefixText: '${L10n.of(context)!.homeserver}: ', hintText: L10n.of(context)!.enterYourHomeserver, suffixIcon: const Icon(Icons.search), diff --git a/lib/pages/login/login_view.dart b/lib/pages/login/login_view.dart index 80dae7a79..8ec092cbf 100644 --- a/lib/pages/login/login_view.dart +++ b/lib/pages/login/login_view.dart @@ -24,7 +24,8 @@ class LoginView extends StatelessWidget { final textFieldFillColor = FluffyThemes.isColumnMode(context) ? Theme.of(context).colorScheme.surface - : Theme.of(context).colorScheme.surfaceContainerHighest; + // ignore: deprecated_member_use + : Theme.of(context).colorScheme.surfaceVariant; return LoginScaffold( enforceMobileMode: Matrix.of(context).client.isLogged(), diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index 883a48066..da60ee597 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -120,7 +120,8 @@ class UserBottomSheetView extends StatelessWidget { padding: const EdgeInsets.all(12.0), child: Material( color: - Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + Theme.of(context).colorScheme.surfaceVariant, borderRadius: BorderRadius.circular(AppConfig.borderRadius), child: ListTile( diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 86b7eb241..a32ad5704 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -64,13 +64,40 @@ parts: stage-snaps: - zenity-integration + flutter-git: + source: https://github.com/flutter/flutter.git + source-tag: 3.19.6 + source-depth: 1 + plugin: nil + override-build: | + mkdir -p $CRAFT_PART_INSTALL/usr/bin + mkdir -p $CRAFT_PART_INSTALL/usr/libexec + cp -r $CRAFT_PART_SRC $CRAFT_PART_INSTALL/usr/libexec/flutter + ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter + ln -s $SNAPCRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $SNAPCRAFT_PART_INSTALL/usr/bin/dart + $CRAFT_PART_INSTALL/usr/bin/flutter doctor + build-packages: + - clang + - cmake + - curl + - libgtk-3-dev + - ninja-build + - unzip + - xz-utils + - zip + override-prime: '' + fluffychat: - plugin: flutter + after: [flutter-git] + plugin: nil source: . override-build: | # Workaround for Flutter build error: rm -rf build - craftctl default + + flutter build linux --release -v + mkdir -p $CRAFT_PART_INSTALL/bin/ + cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ build-packages: - libjsoncpp-dev - curl @@ -87,7 +114,7 @@ slots: apps: fluffychat: - command: fluffychat + command: bin/fluffychat extensions: [ gnome ] plugs: - audio-playback From 6d906ad637bedb922258e48578cb18aed91119f8 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Wed, 29 May 2024 19:38:13 +0200 Subject: [PATCH 11/12] build: Bump version to v1.21.0 --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a87b31034..b1a6a7397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,44 @@ +## v1.21.0 +FluffyChat v1.21.0 introduces the new search feature which also includes a gallery and files list for each chat. Several performance improvements have been added under the hood, leading to a much nicer user experience. + +- feat: Enable download images on iOS, not only share images (krille-chan) +- feat: Search feature (krille-chan) +- build: Update record package (krille-chan) +- build: Use correct pubspec.yaml format for hosted dependency (krille-chan) +- build: Use matrix sdk main branch (krille-chan) +- chore: Change default timeout to 30 min (krille-chan) +- chore: Go back to pub.dev matrix sdk (Krille) +- chore: Hotfix create missing objectbox (Krille) +- chore: Increase default network request timeout (Krille) +- chore: Make bottomnavbar labels always visible (krille-chan) +- chore: Nicer message animation (krille-chan) +- chore: Only load last event sender if necessary (Krille) +- chore: Set a maxsize for textfields (Krille) +- chore: upgrade flutter to 3.22.0 (lauren n. liberda) +- chore: upgrade flutter to 3.22.1 (lauren n. liberda) +- ci: run `flutter gen-l10n` on code_tests (lauren n. liberda) +- design: Improve design of Voice Messages and add 1.25 as speed (Krille) +- fastlane: i18n ru (Yurt Page) +- fastlane: improve full_description.txt (Yurt Page) +- fix: Broken localization with empty strings in it (krille-chan) +- fix: FakeMatrixApi check (krille-chan) +- fix: mxc reactions not rendered correctly (krille-chan) +- fix: Stickers from gboard have black background (Krille) +- fix: voip code breaking from 0.28 (td) +- refactor: Delete database file on failed app start (krille-chan) +- refactor: Display better command hints (Krille) +- refactor: Improve performance of chat list (krille-chan) +- refactor: Precache theme and directchatmatrixid to improve performance in chat list item (krille-chan) +- refactor: Update to Matrix Dart SDK 0.29.9 (Krille) +- Translated using Weblate (Croatian) (Milo Ivir) +- Translated using Weblate (Czech) (Jozef Mlich) +- Translated using Weblate (Georgian) (Nicholas Winterhalter) +- Translated using Weblate (German) (Gian Klug) +- Translated using Weblate (Korean) (kdh8219) +- Translated using Weblate (Latvian) (Edgars Andersons) +- Translated using Weblate (Norwegian Bokmål) (sunniva) +- Translated using Weblate (Turkish) (Oğuz Ersen) + ## v1.20.0 Design improvements and new advanced UI to manage rooms. diff --git a/pubspec.yaml b/pubspec.yaml index 3f7938580..a71436c55 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: fluffychat description: Chat with your friends. publish_to: none # On version bump also increase the build number for F-Droid -version: 1.20.0+3532 +version: 1.21.0+3533 environment: sdk: ">=3.0.0 <4.0.0" From 3bc66f87e00e3127af1ab2b0302801453c910a19 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Wed, 29 May 2024 20:48:21 +0200 Subject: [PATCH 12/12] chore: Follow up design typing indicator --- lib/pages/chat/typing_indicators.dart | 41 ++++++++++++--------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/lib/pages/chat/typing_indicators.dart b/lib/pages/chat/typing_indicators.dart index c30789fff..47079d4c3 100644 --- a/lib/pages/chat/typing_indicators.dart +++ b/lib/pages/chat/typing_indicators.dart @@ -14,6 +14,8 @@ class TypingIndicators extends StatelessWidget { @override Widget build(BuildContext context) { + const avatarSize = Avatar.defaultSize / 2; + return StreamBuilder( stream: controller.room.client.onSync.stream.where( (syncUpdate) => @@ -24,7 +26,7 @@ class TypingIndicators extends StatelessWidget { builder: (context, _) { final typingUsers = controller.room.typingUsers ..removeWhere((u) => u.stateKey == Matrix.of(context).client.userID); - const topPadding = 20.0; + const bottomPadding = 4.0; return Container( width: double.infinity, @@ -32,8 +34,7 @@ class TypingIndicators extends StatelessWidget { child: AnimatedContainer( constraints: const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 2.5), - height: - typingUsers.isEmpty ? 0 : Avatar.defaultSize + bottomPadding, + height: typingUsers.isEmpty ? 0 : avatarSize + bottomPadding, duration: FluffyThemes.animationDuration, curve: FluffyThemes.animationCurve, alignment: controller.timeline!.events.isNotEmpty && @@ -50,14 +51,13 @@ class TypingIndicators extends StatelessWidget { child: Row( children: [ SizedBox( - height: Avatar.defaultSize, - width: typingUsers.length < 2 - ? Avatar.defaultSize - : Avatar.defaultSize + 16, + height: avatarSize, + width: typingUsers.length < 2 ? avatarSize : avatarSize + 16, child: Stack( children: [ if (typingUsers.isNotEmpty) Avatar( + size: avatarSize, mxContent: typingUsers.first.avatarUrl, name: typingUsers.first.calcDisplayname(), ), @@ -65,6 +65,7 @@ class TypingIndicators extends StatelessWidget { Padding( padding: const EdgeInsets.only(left: 16), child: Avatar( + size: avatarSize, mxContent: typingUsers.length == 2 ? typingUsers.last.avatarUrl : null, @@ -77,22 +78,16 @@ class TypingIndicators extends StatelessWidget { ), ), const SizedBox(width: 8), - Padding( - padding: const EdgeInsets.only(top: topPadding), - child: Material( - color: - // ignore: deprecated_member_use - Theme.of(context).colorScheme.surfaceVariant, - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(2), - topRight: Radius.circular(AppConfig.borderRadius), - bottomLeft: Radius.circular(AppConfig.borderRadius), - bottomRight: Radius.circular(AppConfig.borderRadius), - ), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: typingUsers.isEmpty ? null : const _TypingDots(), - ), + Material( + color: + // ignore: deprecated_member_use + Theme.of(context).colorScheme.surfaceVariant, + borderRadius: const BorderRadius.all( + Radius.circular(AppConfig.borderRadius), + ), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: typingUsers.isEmpty ? null : const _TypingDots(), ), ), ],