From a1ee965b9e80dfe7cf448c5f193affde2c796d4f Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 3 Sep 2024 10:25:55 -0400 Subject: [PATCH 1/4] account for chat details column showing in message overlay --- lib/pangea/widgets/chat/message_selection_overlay.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pangea/widgets/chat/message_selection_overlay.dart b/lib/pangea/widgets/chat/message_selection_overlay.dart index a62b8e930..6f3100b24 100644 --- a/lib/pangea/widgets/chat/message_selection_overlay.dart +++ b/lib/pangea/widgets/chat/message_selection_overlay.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:fluffychat/config/setting_keys.dart'; import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/pages/chat/chat.dart'; import 'package:fluffychat/pages/chat/events/message.dart'; @@ -189,13 +190,18 @@ class MessageSelectionOverlayState extends State { ), ); + final bool showDetails = Matrix.of(context) + .store + .getBool(SettingKeys.displayChatDetailsColumn) ?? + false; + return Expanded( child: Stack( children: [ AnimatedPositioned( duration: FluffyThemes.animationDuration, left: 0, - right: 0, + right: showDetails ? FluffyThemes.columnWidth : 0, bottom: adjustedOverlayBottomOffset == -1 ? overlayBottomOffset : adjustedOverlayBottomOffset, From 5e145837d2a16d0cc0dce2fe3afab0ebe2f50861 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 3 Sep 2024 10:43:26 -0400 Subject: [PATCH 2/4] add padding to reaction picker --- .../chat/message_selection_overlay.dart | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/pangea/widgets/chat/message_selection_overlay.dart b/lib/pangea/widgets/chat/message_selection_overlay.dart index 6f3100b24..744863187 100644 --- a/lib/pangea/widgets/chat/message_selection_overlay.dart +++ b/lib/pangea/widgets/chat/message_selection_overlay.dart @@ -190,10 +190,12 @@ class MessageSelectionOverlayState extends State { ), ); - final bool showDetails = Matrix.of(context) - .store - .getBool(SettingKeys.displayChatDetailsColumn) ?? - false; + final bool showDetails = (Matrix.of(context) + .store + .getBool(SettingKeys.displayChatDetailsColumn) ?? + false) && + FluffyThemes.isThreeColumnMode(context) && + widget.controller.room.membership == Membership.join; return Expanded( child: Stack( @@ -212,10 +214,21 @@ class MessageSelectionOverlayState extends State { ), Align( alignment: Alignment.bottomCenter, - child: Column( + child: Row( mainAxisSize: MainAxisSize.min, children: [ - OverlayFooter(controller: widget.controller), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + OverlayFooter(controller: widget.controller), + ], + ), + ), + if (showDetails) + const SizedBox( + width: FluffyThemes.columnWidth, + ), ], ), ), From 660c49873b297f8310f0e2843e65cf9f30d04a0a Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 3 Sep 2024 11:22:17 -0400 Subject: [PATCH 3/4] removed expanded widget wrapping overlay stack that caused crash in release mode --- .../chat/message_selection_overlay.dart | 72 +++++++++---------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/lib/pangea/widgets/chat/message_selection_overlay.dart b/lib/pangea/widgets/chat/message_selection_overlay.dart index 744863187..e7c391a5b 100644 --- a/lib/pangea/widgets/chat/message_selection_overlay.dart +++ b/lib/pangea/widgets/chat/message_selection_overlay.dart @@ -197,46 +197,44 @@ class MessageSelectionOverlayState extends State { FluffyThemes.isThreeColumnMode(context) && widget.controller.room.membership == Membership.join; - return Expanded( - child: Stack( - children: [ - AnimatedPositioned( - duration: FluffyThemes.animationDuration, - left: 0, - right: showDetails ? FluffyThemes.columnWidth : 0, - bottom: adjustedOverlayBottomOffset == -1 - ? overlayBottomOffset - : adjustedOverlayBottomOffset, - child: Align( - alignment: Alignment.center, - child: overlayMessage, - ), + return Stack( + children: [ + AnimatedPositioned( + duration: FluffyThemes.animationDuration, + left: 0, + right: showDetails ? FluffyThemes.columnWidth : 0, + bottom: adjustedOverlayBottomOffset == -1 + ? overlayBottomOffset + : adjustedOverlayBottomOffset, + child: Align( + alignment: Alignment.center, + child: overlayMessage, ), - Align( - alignment: Alignment.bottomCenter, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Expanded( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - OverlayFooter(controller: widget.controller), - ], - ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + OverlayFooter(controller: widget.controller), + ], ), - if (showDetails) - const SizedBox( - width: FluffyThemes.columnWidth, - ), - ], - ), + ), + if (showDetails) + const SizedBox( + width: FluffyThemes.columnWidth, + ), + ], ), - Material( - child: OverlayHeader(controller: widget.controller), - ), - ], - ), + ), + Material( + child: OverlayHeader(controller: widget.controller), + ), + ], ); } } From 4fe9b05c892179be354a496b94388fec03355817 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Wed, 4 Sep 2024 09:43:12 -0400 Subject: [PATCH 4/4] upgrade to the most recent version of our fork of the matrix sdk --- assets/l10n/intl_en.arb | 5 +++-- lib/utils/matrix_sdk_extensions/matrix_locals.dart | 3 +++ pubspec.lock | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 9921f8c28..e3ff06b16 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -4127,6 +4127,7 @@ "createSpace": "Create space", "createChat": "Create chat", "error520Title": "Please try again.", - "error520Desc": "Sorry, we could not understand your message...", - "translationChoicesBody": "Click and hold an option for a hint." + "error520Desc": "Sorry, we could not understand your message...", + "translationChoicesBody": "Click and hold an option for a hint.", + "sendCanceled": "Sending canceled" } \ No newline at end of file diff --git a/lib/utils/matrix_sdk_extensions/matrix_locals.dart b/lib/utils/matrix_sdk_extensions/matrix_locals.dart index cbba6b630..a492b87ee 100644 --- a/lib/utils/matrix_sdk_extensions/matrix_locals.dart +++ b/lib/utils/matrix_sdk_extensions/matrix_locals.dart @@ -347,4 +347,7 @@ class MatrixLocals extends MatrixLocalizations { @override String invitedBy(String senderName) => l10n.invitedBy(senderName); + + @override + String get cancelledSend => l10n.sendCanceled; } diff --git a/pubspec.lock b/pubspec.lock index a0affbe48..e9e47cfb8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1434,10 +1434,10 @@ packages: description: path: "." ref: main - resolved-ref: "5f22d0e9aed99f3044a208bb69f446d470eaa464" + resolved-ref: "7c1349800b651edc451f2173388f26024a438bda" url: "https://github.com/pangeachat/matrix-dart-sdk.git" source: git - version: "0.30.0" + version: "0.31.0" meta: dependency: transitive description: