chore: Add sync status logs

This commit is contained in:
Christian Pauly 2022-12-14 09:52:00 +01:00
parent 36237d04aa
commit b6d5e49b4e

View File

@ -347,6 +347,8 @@ class ChatListController extends State<ChatList>
}
}
StreamSubscription? _onSyncStatus;
@override
void initState() {
_initReceiveSharingIntent();
@ -361,6 +363,10 @@ class ChatListController extends State<ChatList>
_checkTorBrowser();
Matrix.of(context).backgroundPush?.setupPush();
_onSyncStatus =
Matrix.of(context).client.onSyncStatus.stream.listen((status) {
Logs().v('Sync Status: ${status.status.name}');
});
super.initState();
}
@ -370,6 +376,7 @@ class ChatListController extends State<ChatList>
_intentDataStreamSubscription?.cancel();
_intentFileStreamSubscription?.cancel();
_intentUriStreamSubscription?.cancel();
_onSyncStatus?.cancel();
scrollController.removeListener(_onScroll);
super.dispose();
}