From 32c61909cc3f6e49d76fb59d9f4bd5bee7b35fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Thu, 25 Sep 2025 08:10:09 +0200 Subject: [PATCH] chore: Adjust chat details button design --- lib/pages/chat_details/chat_details_view.dart | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart index 332bb738f..cc31f0278 100644 --- a/lib/pages/chat_details/chat_details_view.dart +++ b/lib/pages/chat_details/chat_details_view.dart @@ -208,33 +208,23 @@ class ChatDetailsView extends StatelessWidget { ], ), Divider(color: theme.dividerColor), - if (!room.canChangeStateEvent(EventTypes.RoomTopic)) - ListTile( - title: Text( - L10n.of(context).chatDescription, - style: TextStyle( - color: theme.colorScheme.secondary, - fontWeight: FontWeight.bold, - ), - ), - ) - else - Padding( - padding: const EdgeInsets.all(16.0), - child: TextButton.icon( - onPressed: controller.setTopicAction, - label: Text(L10n.of(context).setChatDescription), - icon: const Icon(Icons.edit_outlined), - style: TextButton.styleFrom( - iconColor: - theme.colorScheme.onSecondaryContainer, - backgroundColor: - theme.colorScheme.secondaryContainer, - foregroundColor: - theme.colorScheme.onSecondaryContainer, - ), + ListTile( + title: Text( + L10n.of(context).chatDescription, + style: TextStyle( + color: theme.colorScheme.secondary, + fontWeight: FontWeight.bold, ), ), + trailing: room + .canChangeStateEvent(EventTypes.RoomTopic) + ? IconButton( + onPressed: controller.setTopicAction, + tooltip: L10n.of(context).setChatDescription, + icon: const Icon(Icons.edit_outlined), + ) + : null, + ), Padding( padding: const EdgeInsets.symmetric( horizontal: 16.0,