From c7f53028c2485292cc105499343fa7e1112c9292 Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Thu, 27 Nov 2025 12:38:29 +0500 Subject: [PATCH] fix: do not show block action on group rooms --- .../reports/problems/problems-report.html | 2 +- lib/pages/chat_list/chat_list.dart | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html index 972d482..f85479d 100644 --- a/android/build/reports/problems/problems-report.html +++ b/android/build/reports/problems/problems-report.html @@ -650,7 +650,7 @@ code + .copy-button { diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index 7d4fa01..6274e7c 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -113,7 +113,6 @@ class ChatListController extends State void onChatTap(Room room) async { if (room.membership == Membership.invite) { - return; } @@ -590,23 +589,24 @@ class ChatListController extends State ], ), ), - PopupMenuItem( - value: ChatContextAction.block, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - Icons.block_outlined, - color: Theme.of(context).colorScheme.error, - ), - const SizedBox(width: 12), - Text( - L10n.of(context).block, - style: TextStyle(color: Theme.of(context).colorScheme.error), - ), - ], + if (room.isDirectChat) + PopupMenuItem( + value: ChatContextAction.block, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.block_outlined, + color: Theme.of(context).colorScheme.error, + ), + const SizedBox(width: 12), + Text( + L10n.of(context).block, + style: TextStyle(color: Theme.of(context).colorScheme.error), + ), + ], + ), ), - ), PopupMenuItem( value: ChatContextAction.leave, child: Row(