From 402031787316579f6db7ddb0a3747ff81891f51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Wed, 5 Nov 2025 09:21:49 +0100 Subject: [PATCH] chore: Hide pinned events in thread --- lib/pages/chat/chat_view.dart | 8 +++++--- lib/pages/chat/pinned_events.dart | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index ff66eca46..e61cb29d1 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -191,10 +191,11 @@ class ChatView extends StatelessWidget { if (activeThreadId != null) { appbarBottomHeight += ChatAppBarListTile.fixedHeight; } - if (controller.room.pinnedEventIds.isNotEmpty) { + if (controller.room.pinnedEventIds.isNotEmpty && + activeThreadId == null) { appbarBottomHeight += ChatAppBarListTile.fixedHeight; } - if (scrollUpBannerEventId != null) { + if (scrollUpBannerEventId != null && activeThreadId == null) { appbarBottomHeight += ChatAppBarListTile.fixedHeight; } return Scaffold( @@ -269,7 +270,8 @@ class ChatView extends StatelessWidget { ), ), ), - if (scrollUpBannerEventId != null) + if (scrollUpBannerEventId != null && + activeThreadId == null) ChatAppBarListTile( leading: IconButton( color: theme.colorScheme.onSurfaceVariant, diff --git a/lib/pages/chat/pinned_events.dart b/lib/pages/chat/pinned_events.dart index ef9dd29a1..7c9967a5b 100644 --- a/lib/pages/chat/pinned_events.dart +++ b/lib/pages/chat/pinned_events.dart @@ -59,7 +59,7 @@ class PinnedEvents extends StatelessWidget { final pinnedEventIds = controller.room.pinnedEventIds; - if (pinnedEventIds.isEmpty) { + if (pinnedEventIds.isEmpty || controller.activeThreadId != null) { return const SizedBox.shrink(); }