fix: Setup push on chat list init

This commit is contained in:
Christian Pauly 2022-12-05 09:11:52 +01:00
commit 082fcdb1af
3 changed files with 5 additions and 7 deletions

View file

@ -72,8 +72,6 @@ class BackgroundPush {
bool upAction = false;
BackgroundPush._(this.client) {
onLogin ??=
client.onLoginStateChanged.stream.listen(handleLoginStateChanged);
onRoomSync ??= client.onSync.stream
.where((s) => s.hasRoomUpdate)
.listen((s) => _onClearingPush(getFromServer: false));
@ -123,7 +121,6 @@ class BackgroundPush {
void handleLoginStateChanged(_) => setupPush();
StreamSubscription<LoginState>? onLogin;
StreamSubscription<SyncUpdate>? onRoomSync;
void _newFcmToken(String token) {