From 00f7e229b81702a15561e1d9a017f40b8d078e60 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 14 Dec 2022 09:52:00 +0100 Subject: [PATCH] chore: Add sync status logs --- lib/pages/chat_list/chat_list.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index e730f68cf..1473f7bdf 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -347,6 +347,8 @@ class ChatListController extends State } } + StreamSubscription? _onSyncStatus; + @override void initState() { _initReceiveSharingIntent(); @@ -361,6 +363,10 @@ class ChatListController extends State _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 _intentDataStreamSubscription?.cancel(); _intentFileStreamSubscription?.cancel(); _intentUriStreamSubscription?.cancel(); + _onSyncStatus?.cancel(); scrollController.removeListener(_onScroll); super.dispose(); }