From 523152c124ed1c488256ecbd1265ac935d49ed3b Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 24 六月 2026 14:19:52 +0800
Subject: [PATCH] 492 对跳脸类窗口按名去重,结算类窗口不去重。修复断线重连重复显示同一个跳脸界面问题
---
Main/Component/UI/Common/PopupWindowsProcessor.cs | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/Main/Component/UI/Common/PopupWindowsProcessor.cs b/Main/Component/UI/Common/PopupWindowsProcessor.cs
index c63eaea..0958ece 100644
--- a/Main/Component/UI/Common/PopupWindowsProcessor.cs
+++ b/Main/Component/UI/Common/PopupWindowsProcessor.cs
@@ -11,6 +11,18 @@
// 寮圭獥闃熷垪锛屽瓨鍌ㄥ緟澶勭悊鐨勫脊绐楄姹�
List<PopupWindow> popupWindowQueue = new List<PopupWindow>();
+ // 璺宠劯绫荤獥鍙g櫧鍚嶅崟锛氳繖绫荤獥鍙f瘡澶�/姣忎簨浠跺彧搴斿脊涓�娆★紝鎸夌獥鍙e悕鍘婚噸锛�
+ // 缁撶畻绫荤獥鍙o紙鍚屽悕鎵胯浇涓嶅悓鎴樻枟鏁版嵁銆佸彲杩炵画澶氬満锛変笉鍦ㄦ鍒楋紝涓嶅仛鍘婚噸銆�
+ private static readonly HashSet<string> DeduplicateWindowNames = new HashSet<string>
+ {
+ "FirstChargeWin",
+ "FestivalActivityPopWin",
+ "HeroDebutPopWin",
+ "HeroReturnPopWin",
+ "SignWin",
+ "GoodReviewWin",
+ };
+
// 褰撳墠姝e湪鏄剧ず鐨勫脊绐�
PopupWindow currentWindow;
@@ -37,9 +49,16 @@
functionId = functionId,
};
- if (popupWindowQueue.Contains(popupWindow))
+ // 浠呭璺宠劯绫荤獥鍙f寜鍚嶅幓閲嶏紱缁撶畻绫荤獥鍙e悓鍚嶆壙杞戒笉鍚屾垬鏂楋紝淇濈暀閲嶅鍏ラ槦
+ if (DeduplicateWindowNames.Contains(name))
{
- popupWindowQueue.Remove(popupWindow);
+ for (int i = popupWindowQueue.Count - 1; i >= 0; i--)
+ {
+ if (popupWindowQueue[i].window == name)
+ {
+ popupWindowQueue.RemoveAt(i);
+ }
+ }
}
popupWindowQueue.Add(popupWindow);
--
Gitblit v1.8.0