From 5dd15d128247865244e3e5000c4bc41c7441826e Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:25:15 +0800 Subject: [PATCH] fix: privacy mode, msgbox sometimes does not show (#12117) Signed-off-by: fufesou --- flutter/lib/models/model.dart | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index d8d33048b..c28d3c1d6 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -991,17 +991,12 @@ class FfiModel with ChangeNotifier { String link, bool hasRetry, OverlayDialogManager dialogManager) { - if (text == 'no_need_privacy_mode_no_physical_displays_tip' || - text == 'Enter privacy mode') { - // There are display changes on the remote side, - // which will cause some messages to refresh the canvas and dismiss dialogs. - // So we add a delay here to ensure the dialog is displayed. - Future.delayed(Duration(milliseconds: 3000), () { - showMsgBox(sessionId, type, title, text, link, hasRetry, dialogManager); - }); - } else { + // There are display changes on the remote side, + // which will cause some messages to refresh the canvas and dismiss dialogs. + // So we add a delay here to ensure the dialog is displayed. + Future.delayed(Duration(milliseconds: 3000), () { showMsgBox(sessionId, type, title, text, link, hasRetry, dialogManager); - } + }); } _updateSessionWidthHeight(SessionID sessionId) {