From e8fa0b7bf6e9b689c017b2b17d558e383622752a Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:45:34 +0000 Subject: [PATCH] ios: switch profile without blank chat when opening invitation from notification Tapping a contact-request notification for another profile switched the active user but left chatModel.chatId pointing at the previous profile's open chat, which is absent from the switched profile's chats, so a blank chat view was shown. Reset chatId on the profile switch so the UI lands on the switched profile's chat list. --- apps/ios/Shared/Model/NtfManager.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ios/Shared/Model/NtfManager.swift b/apps/ios/Shared/Model/NtfManager.swift index c6c6e88d8c..4d2fb6d303 100644 --- a/apps/ios/Shared/Model/NtfManager.swift +++ b/apps/ios/Shared/Model/NtfManager.swift @@ -60,6 +60,9 @@ class NtfManager: NSObject, UNUserNotificationCenterDelegate, ObservableObject { userId != chatModel.currentUser?.userId { logger.debug("NtfManager.processNotificationResponse changeActiveUser") changeActiveUser(userId, viewPwd: nil) + // the currently open chat belongs to the previous profile and is absent from the + // switched profile's chats, so drop it to land on the chat list instead of a blank chat view + chatModel.chatId = nil } if content.categoryIdentifier == ntfCategoryContactRequest && action == ntfActionAcceptContact, let chatId = content.userInfo["chatId"] as? String {