From 33b6883df2df154909e5bda5c1a275c55bec65ae Mon Sep 17 00:00:00 2001 From: jasonchenwork Date: Thu, 22 May 2025 10:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3BUG(=E5=88=87=E6=8F=9B?= =?UTF-8?q?=E9=A0=81=E9=9D=A2=E9=A1=AF=E7=A4=BA=E9=8C=AF=E8=AA=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrimaryFormParts/PrimaryForm.MultiPagePanel.cs | 8 ++++++-- PrimaryFormParts/PrimaryForm.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs b/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs index 2b55a7d..848643f 100644 --- a/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs +++ b/PrimaryFormParts/PrimaryForm.MultiPagePanel.cs @@ -52,6 +52,7 @@ namespace DualScreenDemo } } } + private bool _isShowingSinger = true; private List currentSongList = new List(); public List get_currentSongList(){ return currentSongList; @@ -145,7 +146,7 @@ namespace DualScreenDemo { currentPageIndex++; // 如果歌單為0(沒有歌單),則刷新歌手列表 - if(currentSongList.Count == 0) + if(_isShowingSinger) { RefreshDisplayBase_Singer(); } @@ -173,6 +174,7 @@ namespace DualScreenDemo public void LoadSongs(List songs, bool clearHistory = false) { + _isShowingSinger = false; currentSongList = songs; currentArtistList.Clear(); currentPageIndex = 0; @@ -184,8 +186,9 @@ namespace DualScreenDemo public void LoadSingers(List artists) { + _isShowingSinger = true; currentArtistList = artists; - //currentSongList.Clear(); + // currentSongList.Clear(); currentPageIndex = 0; totalPages = (int)Math.Ceiling(artists.Count / (double)itemsPerPage); RefreshDisplayBase_Singer(); @@ -193,6 +196,7 @@ namespace DualScreenDemo public void LoadPlayedSongs(List songs, List states) { + _isShowingSinger = false; currentSongList = songs; currentArtistList.Clear(); currentPageIndex = 0; diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index de3ee11..4d90c23 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -2573,7 +2573,7 @@ namespace DualScreenDemo closeQRCodeButton.Visible = false; } - multiPagePanel.LoadPlayedSongs(currentSongList, playStates); + multiPagePanel.LoadPlayedSongs(playedSongsHistory, playStates); } } } \ No newline at end of file