mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 09:45:14 +00:00
fix: Do not setup push on every app resume
This commit is contained in:
parent
3d3a8f1853
commit
6c53ab370b
1 changed files with 0 additions and 6 deletions
|
@ -430,8 +430,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
voipPlugin = webrtcIsSupported ? VoipPlugin(client) : null;
|
voipPlugin = webrtcIsSupported ? VoipPlugin(client) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _firstStartup = true;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
Logs().v('AppLifecycleState = $state');
|
Logs().v('AppLifecycleState = $state');
|
||||||
|
@ -440,10 +438,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
client.backgroundSync = foreground;
|
client.backgroundSync = foreground;
|
||||||
client.syncPresence = foreground ? null : PresenceType.unavailable;
|
client.syncPresence = foreground ? null : PresenceType.unavailable;
|
||||||
client.requestHistoryOnLimitedTimeline = !foreground;
|
client.requestHistoryOnLimitedTimeline = !foreground;
|
||||||
if (_firstStartup) {
|
|
||||||
_firstStartup = false;
|
|
||||||
backgroundPush?.setupPush();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void initSettings() {
|
void initSettings() {
|
||||||
|
|
Loading…
Reference in a new issue