fix: Keep ongoing events if present on reported

This commit is contained in:
2025-02-26 15:04:54 +08:00
parent 14202714cc
commit 7f2c0d2e23

View File

@@ -167,11 +167,13 @@ namespace Cryville.EEW.Unity {
Debug.LogError(e); Debug.LogError(e);
_ongoingReportManager.Report(e); _ongoingReportManager.Report(e);
_uiActionQueue.Enqueue(() => { _uiActionQueue.Enqueue(() => {
if (m_mapElementManager.Count == 0) {
m_mapElementManager.SetSelected(e); m_mapElementManager.SetSelected(e);
m_cameraController.OnMapElementUpdated();
}
if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) { if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) {
_latestHistoryReport = e; _latestHistoryReport = e;
} }
m_cameraController.OnMapElementUpdated();
}); });
} }
void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) { void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) {