mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 12:25:11 +00:00
chore: Follow up status feature
This commit is contained in:
parent
28c3efae23
commit
107374cf60
5 changed files with 10 additions and 7 deletions
|
@ -153,7 +153,8 @@ class ChatListViewBody extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (!controller.isSearchMode)
|
if (!controller.isSearchMode &&
|
||||||
|
controller.activeFilter != ActiveFilter.groups)
|
||||||
StatusMessageList(
|
StatusMessageList(
|
||||||
onStatusEdit: controller.setStatus,
|
onStatusEdit: controller.setStatus,
|
||||||
),
|
),
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||||
|
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
floating: true,
|
floating: true,
|
||||||
toolbarHeight: (Theme.of(context).appBarTheme.toolbarHeight ?? 56) + 16,
|
toolbarHeight: 72,
|
||||||
pinned:
|
pinned:
|
||||||
FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal,
|
FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal,
|
||||||
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
|
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
|
||||||
|
|
|
@ -34,6 +34,7 @@ class UserBottomSheetView extends StatelessWidget {
|
||||||
leading: CloseButton(
|
leading: CloseButton(
|
||||||
onPressed: Navigator.of(context, rootNavigator: false).pop,
|
onPressed: Navigator.of(context, rootNavigator: false).pop,
|
||||||
),
|
),
|
||||||
|
centerTitle: false,
|
||||||
title: Column(
|
title: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -51,7 +52,7 @@ class UserBottomSheetView extends StatelessWidget {
|
||||||
final dotColor = presence.presence.isOnline
|
final dotColor = presence.presence.isOnline
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: presence.presence.isUnavailable
|
: presence.presence.isUnavailable
|
||||||
? Colors.red
|
? Colors.orange
|
||||||
: Colors.grey;
|
: Colors.grey;
|
||||||
|
|
||||||
final lastActiveTimestamp = presence.lastActiveTimestamp;
|
final lastActiveTimestamp = presence.lastActiveTimestamp;
|
||||||
|
|
|
@ -89,7 +89,7 @@ class Avatar extends StatelessWidget {
|
||||||
final dotColor = presence.presence.isOnline
|
final dotColor = presence.presence.isOnline
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: presence.presence.isUnavailable
|
: presence.presence.isUnavailable
|
||||||
? Colors.red
|
? Colors.orange
|
||||||
: Colors.grey;
|
: Colors.grey;
|
||||||
return Positioned(
|
return Positioned(
|
||||||
bottom: -4,
|
bottom: -4,
|
||||||
|
|
|
@ -417,9 +417,10 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
Logs().v('AppLifecycleState = $state');
|
Logs().v('AppLifecycleState = $state');
|
||||||
final foreground = state != AppLifecycleState.detached &&
|
final foreground =
|
||||||
state != AppLifecycleState.paused;
|
state != AppLifecycleState.resumed && state != AppLifecycleState.paused;
|
||||||
client.syncPresence = foreground ? null : PresenceType.unavailable;
|
client.syncPresence =
|
||||||
|
state == AppLifecycleState.resumed ? null : PresenceType.unavailable;
|
||||||
if (PlatformInfos.isMobile) {
|
if (PlatformInfos.isMobile) {
|
||||||
client.backgroundSync = foreground;
|
client.backgroundSync = foreground;
|
||||||
client.requestHistoryOnLimitedTimeline = !foreground;
|
client.requestHistoryOnLimitedTimeline = !foreground;
|
||||||
|
|
Loading…
Reference in a new issue