修正BUG(切換頁面顯示錯誤)
This commit is contained in:
parent
743f774247
commit
33b6883df2
@ -52,6 +52,7 @@ namespace DualScreenDemo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private bool _isShowingSinger = true;
|
||||||
private List<SongData> currentSongList = new List<SongData>();
|
private List<SongData> currentSongList = new List<SongData>();
|
||||||
public List<SongData> get_currentSongList(){
|
public List<SongData> get_currentSongList(){
|
||||||
return currentSongList;
|
return currentSongList;
|
||||||
@ -145,7 +146,7 @@ namespace DualScreenDemo
|
|||||||
{
|
{
|
||||||
currentPageIndex++;
|
currentPageIndex++;
|
||||||
// 如果歌單為0(沒有歌單),則刷新歌手列表
|
// 如果歌單為0(沒有歌單),則刷新歌手列表
|
||||||
if(currentSongList.Count == 0)
|
if(_isShowingSinger)
|
||||||
{
|
{
|
||||||
RefreshDisplayBase_Singer();
|
RefreshDisplayBase_Singer();
|
||||||
}
|
}
|
||||||
@ -173,6 +174,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
public void LoadSongs(List<SongData> songs, bool clearHistory = false)
|
public void LoadSongs(List<SongData> songs, bool clearHistory = false)
|
||||||
{
|
{
|
||||||
|
_isShowingSinger = false;
|
||||||
currentSongList = songs;
|
currentSongList = songs;
|
||||||
currentArtistList.Clear();
|
currentArtistList.Clear();
|
||||||
currentPageIndex = 0;
|
currentPageIndex = 0;
|
||||||
@ -184,8 +186,9 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
public void LoadSingers(List<Artist> artists)
|
public void LoadSingers(List<Artist> artists)
|
||||||
{
|
{
|
||||||
|
_isShowingSinger = true;
|
||||||
currentArtistList = artists;
|
currentArtistList = artists;
|
||||||
//currentSongList.Clear();
|
// currentSongList.Clear();
|
||||||
currentPageIndex = 0;
|
currentPageIndex = 0;
|
||||||
totalPages = (int)Math.Ceiling(artists.Count / (double)itemsPerPage);
|
totalPages = (int)Math.Ceiling(artists.Count / (double)itemsPerPage);
|
||||||
RefreshDisplayBase_Singer();
|
RefreshDisplayBase_Singer();
|
||||||
@ -193,6 +196,7 @@ namespace DualScreenDemo
|
|||||||
|
|
||||||
public void LoadPlayedSongs(List<SongData> songs, List<PlayState> states)
|
public void LoadPlayedSongs(List<SongData> songs, List<PlayState> states)
|
||||||
{
|
{
|
||||||
|
_isShowingSinger = false;
|
||||||
currentSongList = songs;
|
currentSongList = songs;
|
||||||
currentArtistList.Clear();
|
currentArtistList.Clear();
|
||||||
currentPageIndex = 0;
|
currentPageIndex = 0;
|
||||||
|
@ -2573,7 +2573,7 @@ namespace DualScreenDemo
|
|||||||
closeQRCodeButton.Visible = false;
|
closeQRCodeButton.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiPagePanel.LoadPlayedSongs(currentSongList, playStates);
|
multiPagePanel.LoadPlayedSongs(playedSongsHistory, playStates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user