From d4f0c6c5266f4c03b6fcec593c78b57f11c5ed70 Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Sun, 20 Mar 2022 15:46:03 +0100 Subject: [PATCH 1/2] fix: Open room from notification click produces errors --- lib/pages/chat/chat.dart | 1 + lib/utils/background_push.dart | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 515b3ec4..bd7230b6 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -148,6 +148,7 @@ class ChatController extends State { return; } setReadMarker(); + if (!scrollController.hasClients) return; if (scrollController.position.pixels == scrollController.position.maxScrollExtent && timeline!.events.isNotEmpty && diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 3347f176..0e465896 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -289,13 +289,13 @@ class BackgroundPush { Future goToRoom(String? roomId) async { try { Logs().v('[Push] Attempting to go to room $roomId...'); - if (router == null) { + if (router == null || roomId == null) { return; } await client.roomsLoading; await client.accountDataLoading; final isStory = client - .getRoomById(roomId!) + .getRoomById(roomId) ?.getState(EventTypes.RoomCreate) ?.content .tryGet('type') == From f16c8c77a6fb18ec80af45de041067e2e76ca39b Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Sun, 20 Mar 2022 15:46:09 +0100 Subject: [PATCH 2/2] fix: SSO on Android 12 --- android/app/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 51e8ae7e..fe8afab8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -93,7 +93,8 @@ - +