From 0743fa45eb845c57129da1dd48aff7556de40d0f Mon Sep 17 00:00:00 2001 From: PopSlime Date: Wed, 26 Feb 2025 15:18:37 +0800 Subject: [PATCH] fix: Keep ongoing events if present on reported --- Assets/Cryville.EEW.Unity/Map/MapElementManager.cs | 1 + Assets/Cryville.EEW.Unity/Worker.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Cryville.EEW.Unity/Map/MapElementManager.cs b/Assets/Cryville.EEW.Unity/Map/MapElementManager.cs index f3cd37e..d02b198 100644 --- a/Assets/Cryville.EEW.Unity/Map/MapElementManager.cs +++ b/Assets/Cryville.EEW.Unity/Map/MapElementManager.cs @@ -23,6 +23,7 @@ namespace Cryville.EEW.Unity.Map { readonly List _displayingOrder = new(); public int Count => _displayingReports.Count; + public int OngoingCount => _displayingReports.Count - (_selected != null ? 1 : 0); [SerializeField] MapElementManager m_subManager; diff --git a/Assets/Cryville.EEW.Unity/Worker.cs b/Assets/Cryville.EEW.Unity/Worker.cs index 492f3fa..9421c12 100644 --- a/Assets/Cryville.EEW.Unity/Worker.cs +++ b/Assets/Cryville.EEW.Unity/Worker.cs @@ -167,7 +167,7 @@ namespace Cryville.EEW.Unity { Debug.LogError(e); _ongoingReportManager.Report(e); _uiActionQueue.Enqueue(() => { - if (m_mapElementManager.Count == 0) { + if (m_mapElementManager.OngoingCount == 0) { m_mapElementManager.SetSelected(e); m_cameraController.OnMapElementUpdated(); }