Small changes
This commit is contained in:
parent
696bc2081f
commit
afed4a3ec0
@ -27,6 +27,7 @@ using static SDL2.SDL;
|
||||
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
|
||||
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
|
||||
using Switch = Ryujinx.HLE.Switch;
|
||||
using UserProfile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
|
||||
|
||||
namespace Ryujinx.Headless
|
||||
{
|
||||
|
@ -270,16 +270,16 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
|
||||
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
var Profiles = new ObservableCollection<BaseModel>();
|
||||
var nav = new NavigationDialogHost();
|
||||
ObservableCollection<BaseModel> profiles = [];
|
||||
NavigationDialogHost nav = new();
|
||||
|
||||
_parent.AccountManager.GetAllUsers()
|
||||
.OrderBy(x => x.Name)
|
||||
.ForEach(profile => Profiles.Add(new Models.UserProfile(profile, nav)));
|
||||
.ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
|
||||
|
||||
Profiles.Add(new Models.UserProfile(guest, nav));
|
||||
profiles.Add(new Models.UserProfile(guest, nav));
|
||||
|
||||
var content = new UserSelectorDialog(Profiles);
|
||||
UserSelectorDialog content = new(profiles);
|
||||
(UserId id, _) = await UserSelectorDialog.ShowInputDialog(content, _parent.AccountManager.LastOpenedUser);
|
||||
|
||||
selected = id;
|
||||
|
@ -65,7 +65,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
{
|
||||
_selectedUserId = userProfile.UserId;
|
||||
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
|
||||
var NewProfiles = new ObservableCollection<BaseModel>();
|
||||
ObservableCollection<BaseModel> newProfiles = [];
|
||||
|
||||
foreach (var item in Profiles)
|
||||
{
|
||||
@ -76,10 +76,10 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
{
|
||||
profile.AccountState = AccountState.Open;
|
||||
}
|
||||
NewProfiles.Add(new UserProfile(profile, new NavigationDialogHost()));
|
||||
newProfiles.Add(new UserProfile(profile, new NavigationDialogHost()));
|
||||
}
|
||||
|
||||
Profiles = NewProfiles;
|
||||
Profiles = newProfiles;
|
||||
OnPropertyChanged(nameof(Profiles));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user