chore: Follow up status feature

This commit is contained in:
Krille 2023-12-22 19:27:19 +01:00
commit fa543e93b8
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 21 additions and 8 deletions

View file

@ -419,8 +419,11 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
Logs().v('AppLifecycleState = $state');
final foreground = state != AppLifecycleState.detached &&
state != AppLifecycleState.paused;
client.backgroundSync = foreground;
client.requestHistoryOnLimitedTimeline = !foreground;
client.syncPresence = foreground ? null : PresenceType.unavailable;
if (PlatformInfos.isMobile) {
client.backgroundSync = foreground;
client.requestHistoryOnLimitedTimeline = !foreground;
}
}
void initSettings() {