From 0bc7fc0c7b1337ce3e6084a4e5e578f1a07f6bd7 Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Sat, 26 Oct 2024 12:58:15 +1030 Subject: [PATCH] wait for post login to finish before continuing --- commet/lib/client/matrix/matrix_client.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commet/lib/client/matrix/matrix_client.dart b/commet/lib/client/matrix/matrix_client.dart index 1a218b8f..0565a2df 100644 --- a/commet/lib/client/matrix/matrix_client.dart +++ b/commet/lib/client/matrix/matrix_client.dart @@ -298,7 +298,7 @@ class MatrixClient extends Client { return _matrixClient.logout(); } - void _postLoginSuccess() async { + Future _postLoginSuccess() async { await _updateOwnProfile(); for (var component in getAllComponents()!) { if (component is NeedsPostLoginInit) { @@ -610,7 +610,7 @@ class MatrixClient extends Client { if (result == LoginResult.success) { preferences.addRegisteredMatrixClient(identifier); - _postLoginSuccess(); + await _postLoginSuccess(); } return result;