refactor: Cleanup

This commit is contained in:
2025-02-21 21:43:53 +08:00
parent c0b3449cc8
commit 9193eb9c8c
3 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ namespace Cryville.EEW.Unity.UI {
m_currentView.gameObject.SetActive(true); m_currentView.gameObject.SetActive(true);
Worker.Instance.SetCurrent(e); Worker.Instance.SetCurrent(e);
} }
public void SetCurrent(ReportViewModel viewModel) { public void OnItemClicked(ReportViewModel viewModel) {
int index = _displayingReports.IndexOf(viewModel); int index = _displayingReports.IndexOf(viewModel);
if (index == -1) return; if (index == -1) return;
SwitchTo(index); SwitchTo(index);

View File

@@ -51,7 +51,7 @@ namespace Cryville.EEW.Unity.UI {
m_button.onClick.AddListener(OnViewClicked); m_button.onClick.AddListener(OnViewClicked);
} }
void OnViewClicked() { void OnViewClicked() {
EventOngoingListView.Instance.SetCurrent(_viewModel); EventOngoingListView.Instance.OnItemClicked(_viewModel);
} }
void Update() { void Update() {
_dockRatioTweener.Advance(Time.deltaTime); _dockRatioTweener.Advance(Time.deltaTime);

View File

@@ -1368,7 +1368,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1180, y: 620} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1925427753 --- !u!114 &1925427753
MonoBehaviour: MonoBehaviour: