Add the player select applet. #537

Merged
Jacobwasbeast merged 10 commits from feature-playerSelect into master 2025-01-19 02:40:33 +00:00
4 changed files with 65 additions and 44 deletions
Showing only changes of commit 2cc8c2d574 - Show all commits

View File

@ -6,6 +6,7 @@ using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.Common;
@ -278,9 +279,11 @@ namespace Ryujinx.Ava.UI.Applet
.ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
profiles.Add(new Models.UserProfile(guest, nav));
UserSelectorDialog content = new(profiles);
(UserId id, _) = await UserSelectorDialog.ShowInputDialog(content, _parent.AccountManager.LastOpenedUser);
UserSelectorDialogViewModel ViewModel = new();
ViewModel.Profiles = profiles;
ViewModel.SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId;
UserSelectorDialog content = new(ViewModel);
(UserId id, _) = await UserSelectorDialog.ShowInputDialog(content);
selected = id;

View File

@ -2,27 +2,24 @@
x:Class="Ryujinx.Ava.UI.Applet.UserSelectorDialog"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:applet="clr-namespace:Ryujinx.Ava.UI.Applet"
d:DesignHeight="450"
MinWidth="500"
d:DesignWidth="800"
mc:Ignorable="d"
Focusable="True"
x:DataType="applet:UserSelectorDialog">
x:DataType="viewModels:UserSelectorDialogViewModel">
<UserControl.Resources>
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
</UserControl.Resources>
<Design.DataContext>
<applet:UserSelectorDialog />
<viewModels:UserSelectorDialogViewModel />
</Design.DataContext>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

View File

@ -6,6 +6,7 @@ using Ryujinx.Ava.Common.Locale;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Input;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using System.Collections.ObjectModel;
@ -19,34 +20,13 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
public partial class UserSelectorDialog : UserControl, INotifyPropertyChanged
{
public new event PropertyChangedEventHandler PropertyChanged;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
public UserSelectorDialogViewModel ViewModel { get; set; }
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
private UserId _selectedUserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
private ObservableCollection<BaseModel> _profiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
public ObservableCollection<BaseModel> Profiles
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
get => _profiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
set
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
if (_profiles != value)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
_profiles = value;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
OnPropertyChanged();
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
public UserSelectorDialog(ObservableCollection<BaseModel> profiles)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
public UserSelectorDialog(UserSelectorDialogViewModel viewModel)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
InitializeComponent();
Profiles = profiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
DataContext = this;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = "")
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
ViewModel = viewModel;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
DataContext = ViewModel;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
private void Grid_PointerEntered(object sender, PointerEventArgs e)
@ -71,22 +51,22 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
int selectedIndex = listBox.SelectedIndex;
if (selectedIndex >= 0 && selectedIndex < Profiles.Count)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
if (selectedIndex >= 0 && selectedIndex < ViewModel.Profiles.Count)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
if (Profiles[selectedIndex] is UserProfile userProfile)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
if (ViewModel.Profiles[selectedIndex] is UserProfile userProfile)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
_selectedUserId = userProfile.UserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
ViewModel.SelectedUserId = userProfile.UserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
ObservableCollection<BaseModel> newProfiles = [];
foreach (var item in Profiles)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
foreach (var item in ViewModel.Profiles)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
if (item is UserProfile originalItem)
{
var profile = new UserProfileSft(originalItem.UserId, originalItem.Name, originalItem.Image);
if (profile.UserId == _selectedUserId)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
if (profile.UserId == ViewModel.SelectedUserId)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
profile.AccountState = AccountState.Open;
}
@ -95,16 +75,14 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
}
Profiles = newProfiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
ViewModel.Profiles = newProfiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
}
}
}
}
public static async Task<(UserId Id, bool Result)> ShowInputDialog(UserSelectorDialog content, UserProfileSft accountManagerLastOpenedUser)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
public static async Task<(UserId Id, bool Result)> ShowInputDialog(UserSelectorDialog content)
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
content._selectedUserId = accountManagerLastOpenedUser.UserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
ContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
@ -124,7 +102,7 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{
if (contentDialog.Content is UserSelectorDialog view)
{
result = view._selectedUserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
result = view.ViewModel.SelectedUserId;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
input = true;
}
}

GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`

View File

@ -0,0 +1,43 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using System.Collections.ObjectModel;
namespace Ryujinx.Ava.UI.ViewModels
{
public partial class UserSelectorDialogViewModel : BaseModel
{
private UserId _selectedUserId;
private ObservableCollection<BaseModel> _profiles;
public UserId SelectedUserId
{
get => _selectedUserId;
set
{
if (_selectedUserId != value)
{
_selectedUserId = value;
OnPropertyChanged();
}
}
}
public ObservableCollection<BaseModel> Profiles
{
get => _profiles;
set
{
if (_profiles != value)
{
_profiles = value;
OnPropertyChanged();
}
}
}
public UserSelectorDialogViewModel()
{
Profiles = new ObservableCollection<BaseModel>();
}
}
}