From fdaeccbf70e5e465dd1b6737ab7d6da4d475ebf3 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 515b3ec45..bd7230b63 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 3347f1767..0e465896d 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 5fd3e6c69da6fdc78090df3fa0ae3104e1eff2f1 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 51e8ae7e1..fe8afab8a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -93,7 +93,8 @@ - +