chore: Follow up background sync

This commit is contained in:
Krille 2023-12-27 14:47:53 +01:00
parent f11e9ec6d2
commit 6a75d07dea
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -414,8 +414,8 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
Logs().v('AppLifecycleState = $state');
final foreground =
state != AppLifecycleState.resumed && state != AppLifecycleState.paused;
final foreground = state != AppLifecycleState.inactive &&
state != AppLifecycleState.paused;
client.syncPresence =
state == AppLifecycleState.resumed ? null : PresenceType.unavailable;
if (PlatformInfos.isMobile) {