diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index b10c3dfdb..a1fb4b72f 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2840,5 +2840,6 @@ "appWantsToUseForLoginDescription": "You hereby allow the app and website to share information about you.", "open": "Open", "waitingForServer": "Waiting for server...", - "appIntroduction": "FluffyChat lets you chat with your friends across different messengers. Learn more at https://matrix.org or just tap *Continue*." + "appIntroduction": "FluffyChat lets you chat with your friends across different messengers. Learn more at https://matrix.org or just tap *Continue*.", + "newChatRequest": "📩 New chat request" } diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index c6f8cc277..79d6c8ab9 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -660,7 +660,6 @@ class ChatListController extends State return; case ChatContextAction.leave: final confirmed = await showOkCancelAlertDialog( - useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, message: L10n.of(context).archiveRoomDescription, diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 11961aada..9034b299d 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -45,7 +45,6 @@ class ChatListItem extends StatelessWidget { return forgetResult.isValue; } final confirmed = await showOkCancelAlertDialog( - useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, okLabel: L10n.of(context).leave, @@ -231,8 +230,7 @@ class ChatListItem extends StatelessWidget { size: 16, ), ), - if (room.isFavourite || - room.membership == Membership.invite) + if (room.isFavourite) Padding( padding: EdgeInsets.only( right: hasNotifications ? 4.0 : 0.0, @@ -336,9 +334,18 @@ class ChatListItem extends StatelessWidget { ), builder: (context, snapshot) => Text( room.membership == Membership.invite - ? isDirectChat - ? L10n.of(context).invitePrivateChat - : L10n.of(context).inviteGroupChat + ? room + .getState( + EventTypes.RoomMember, + room.client.userID!, + ) + ?.content + .tryGet('reason') ?? + (isDirectChat + ? L10n.of(context) + .newChatRequest + : L10n.of(context) + .inviteGroupChat) : snapshot.data ?? L10n.of(context).emptyChat, softWrap: false, diff --git a/lib/pages/chat_list/space_view.dart b/lib/pages/chat_list/space_view.dart index 73be8cdcf..5d4f51f69 100644 --- a/lib/pages/chat_list/space_view.dart +++ b/lib/pages/chat_list/space_view.dart @@ -132,12 +132,11 @@ class _SpaceViewState extends State { break; case SpaceActions.leave: final confirmed = await showOkCancelAlertDialog( - useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, - okLabel: L10n.of(context).ok, - cancelLabel: L10n.of(context).cancel, message: L10n.of(context).archiveRoomDescription, + okLabel: L10n.of(context).leave, + cancelLabel: L10n.of(context).cancel, isDestructive: true, ); if (!mounted) return; diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index a31b9e5a3..bb0bdc856 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -56,12 +56,11 @@ class ChatSettingsPopupMenuState extends State { switch (choice) { case ChatPopupMenuActions.leave: final confirmed = await showOkCancelAlertDialog( - useRootNavigator: false, context: context, title: L10n.of(context).areYouSure, - okLabel: L10n.of(context).ok, - cancelLabel: L10n.of(context).cancel, message: L10n.of(context).archiveRoomDescription, + okLabel: L10n.of(context).leave, + cancelLabel: L10n.of(context).cancel, isDestructive: true, ); if (confirmed == OkCancelResult.ok) {