iOS navigation fixes: deep-link pop fallback + back-button PopScope

- notification_service: use GoRouter.go (not push) for terminal states
  (session_closing, session_expired) so the nav stack doesn't linger
  behind deep-linked screens
- chat_screen: PopScope + canPop fallback in client_app so iOS back
  gestures fall back to /home when there is nothing to pop
This commit is contained in:
2026-04-24 11:58:05 +08:00
parent 3a25ddc41d
commit 1a610363bb
2 changed files with 39 additions and 26 deletions

View File

@@ -89,9 +89,8 @@ class NotificationService {
final type = data['type'] as String?;
if (type == 'session_closing' || type == 'session_expired') {
// Navigate to the chat session — closure UI will show
if (sessionId != null) {
_router!.push('/chat/session/$sessionId', extra: 'Bestie');
_router!.go('/chat/session/$sessionId', extra: 'Bestie');
}
} else if ((type == 'chat_message' || type == 'paired') && sessionId != null) {
_router!.push('/chat/session/$sessionId', extra: 'Bestie');