From 107374cf6055595f75fb460e965197414221bc1a Mon Sep 17 00:00:00 2001 From: krille-chan Date: Fri, 22 Dec 2023 20:18:51 +0100 Subject: [PATCH] chore: Follow up status feature --- lib/pages/chat_list/chat_list_body.dart | 3 ++- lib/pages/chat_list/chat_list_header.dart | 2 +- lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart | 3 ++- lib/widgets/avatar.dart | 2 +- lib/widgets/matrix.dart | 7 ++++--- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index 0989285f..211542f4 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -153,7 +153,8 @@ class ChatListViewBody extends StatelessWidget { ), ), ], - if (!controller.isSearchMode) + if (!controller.isSearchMode && + controller.activeFilter != ActiveFilter.groups) StatusMessageList( onStatusEdit: controller.setStatus, ), diff --git a/lib/pages/chat_list/chat_list_header.dart b/lib/pages/chat_list/chat_list_header.dart index 594081e3..d7af38e9 100644 --- a/lib/pages/chat_list/chat_list_header.dart +++ b/lib/pages/chat_list/chat_list_header.dart @@ -18,7 +18,7 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget { return SliverAppBar( floating: true, - toolbarHeight: (Theme.of(context).appBarTheme.toolbarHeight ?? 56) + 16, + toolbarHeight: 72, pinned: FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal, scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null, diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index ff463151..56d1b00f 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -34,6 +34,7 @@ class UserBottomSheetView extends StatelessWidget { leading: CloseButton( onPressed: Navigator.of(context, rootNavigator: false).pop, ), + centerTitle: false, title: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -51,7 +52,7 @@ class UserBottomSheetView extends StatelessWidget { final dotColor = presence.presence.isOnline ? Colors.green : presence.presence.isUnavailable - ? Colors.red + ? Colors.orange : Colors.grey; final lastActiveTimestamp = presence.lastActiveTimestamp; diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index 25c3df15..a9660ce9 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -89,7 +89,7 @@ class Avatar extends StatelessWidget { final dotColor = presence.presence.isOnline ? Colors.green : presence.presence.isUnavailable - ? Colors.red + ? Colors.orange : Colors.grey; return Positioned( bottom: -4, diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index a357e99a..044918f4 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -417,9 +417,10 @@ class MatrixState extends State with WidgetsBindingObserver { @override void didChangeAppLifecycleState(AppLifecycleState state) { Logs().v('AppLifecycleState = $state'); - final foreground = state != AppLifecycleState.detached && - state != AppLifecycleState.paused; - client.syncPresence = foreground ? null : PresenceType.unavailable; + final foreground = + state != AppLifecycleState.resumed && state != AppLifecycleState.paused; + client.syncPresence = + state == AppLifecycleState.resumed ? null : PresenceType.unavailable; if (PlatformInfos.isMobile) { client.backgroundSync = foreground; client.requestHistoryOnLimitedTimeline = !foreground;