mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-09-11 04:18:16 +00:00
feat(ui): improve Amiibo selection UX (ryubing/ryujinx!121)
See merge request ryubing/ryujinx!121
This commit is contained in:
@@ -342,14 +342,24 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
_amiibos.Clear();
|
||||
|
||||
List<AmiiboApi> amiiboSortedList;
|
||||
|
||||
// If no series selected, just display all available amiibos
|
||||
if (_seriesSelectedIndex < 0)
|
||||
{
|
||||
return;
|
||||
amiiboSortedList = _amiiboList
|
||||
.OrderBy(amiibo => amiibo.AmiiboSeries)
|
||||
.ThenBy(x => x.Name)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
amiiboSortedList = _amiiboList
|
||||
.Where(amiibo => amiibo.AmiiboSeries == _amiiboSeries[SeriesSelectedIndex])
|
||||
.OrderBy(amiibo => amiibo.Name).ToList();
|
||||
}
|
||||
|
||||
List<AmiiboApi> amiiboSortedList = _amiiboList
|
||||
.Where(amiibo => amiibo.AmiiboSeries == _amiiboSeries[SeriesSelectedIndex])
|
||||
.OrderBy(amiibo => amiibo.Name).ToList();
|
||||
|
||||
|
||||
for (int i = 0; i < amiiboSortedList.Count; i++)
|
||||
{
|
||||
@@ -386,7 +396,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
Usage = string.Empty;
|
||||
|
||||
if (_amiiboSelectedIndex < 0)
|
||||
if (_amiiboSelectedIndex < 0 || _amiibos.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user