From 80bf7cfa932a43ffa9514f1d49f257a59418d357 Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Thu, 16 Oct 2025 20:49:02 +0500 Subject: [PATCH] chore: remove unused goToRoom --- lib/utils/background_push.dart | 43 ---------------------------------- 1 file changed, 43 deletions(-) diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index e72e1e6..75f6d3a 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -363,49 +363,6 @@ class BackgroundPush { ); } - Future goToRoom(NotificationResponse? response) async { - try { - if (response?.payload == null) return; - final arr = response?.payload?.split(' '); - final roomId = arr?[0]; - final eventId = arr?[1]; - Logs().v('[Push] Attempting to go to room $roomId...'); - if (roomId == null || eventId == null) { - return; - } - await client.roomsLoading; - await client.accountDataLoading; - if (client.getRoomById(roomId) == null) { - await client - .waitForRoomInSync(roomId) - .timeout(const Duration(seconds: 30)); - } - if (response?.actionId == "read") { - if (AppConfig.sendPublicReadReceipts) { - await client.setReadMarker(roomId, mRead: eventId); - } else { - await client.setReadMarker(roomId, mReadPrivate: eventId); - } - return; - } else if (response?.actionId == "reply") { - final replyText = response?.input; - final room = client.getRoomById(roomId); - if (replyText != null && room != null) { - await room.sendTextEvent(replyText, - inReplyTo: await room.getEventById(eventId)); - } - return; - } - FluffyChatApp.router.go( - client.getRoomById(roomId)?.membership == Membership.invite - ? '/rooms' - : '/rooms/$roomId', - ); - } catch (e, s) { - Logs().e('[Push] Failed to open room', e, s); - } - } - Future setupUp() async { await UnifiedPushUi(matrix!.context, ["default"], UPFunctions()) .registerAppWithDialog();