chore: Follow up status feature
This commit is contained in:
parent
28c3efae23
commit
107374cf60
5 changed files with 10 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -417,9 +417,10 @@ class MatrixState extends State<Matrix> 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue