mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-20 10:30:19 +00:00
- Backported long selection bar in Grid/List view not working - Backported UserSelector is jank
47 lines
No EOL
1.2 KiB
C#
47 lines
No EOL
1.2 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using FluentAvalonia.UI.Controls;
|
|
using FluentAvalonia.UI.Navigation;
|
|
using Ryujinx.Ava.UI.Controls;
|
|
|
|
namespace Ryujinx.Ava.UI.Views.User
|
|
{
|
|
public partial class UserRecoverer : UserControl
|
|
{
|
|
private NavigationDialogHost _parent;
|
|
|
|
public UserRecoverer()
|
|
{
|
|
InitializeComponent();
|
|
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
|
{
|
|
NavigatedTo(e);
|
|
}, RoutingStrategies.Direct);
|
|
}
|
|
|
|
private void NavigatedTo(NavigationEventArgs arg)
|
|
{
|
|
if (Program.PreviewerDetached)
|
|
{
|
|
switch (arg.NavigationMode)
|
|
{
|
|
case NavigationMode.New:
|
|
var parent = (NavigationDialogHost)arg.Parameter;
|
|
|
|
_parent = parent;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void GoBack(object sender, RoutedEventArgs e)
|
|
{
|
|
_parent?.GoBack();
|
|
}
|
|
|
|
private void Recover(object sender, RoutedEventArgs e)
|
|
{
|
|
_parent?.RecoverLostAccounts();
|
|
}
|
|
}
|
|
} |