Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ryujinx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ryubing
Ryujinx
Commits
06d34a59
Commit
06d34a59
authored
1 month ago
by
Evan Husted
Browse files
Options
Downloads
Patches
Plain Diff
misc: chore: optimize UserSelectorDialog closed handler
parent
e8e1dc66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
+1
-2
1 addition, 2 deletions
src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
src/Ryujinx/UI/Applet/UserSelectorDialog.axaml.cs
+10
-13
10 additions, 13 deletions
src/Ryujinx/UI/Applet/UserSelectorDialog.axaml.cs
with
11 additions
and
15 deletions
src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
+
1
−
2
View file @
06d34a59
...
...
@@ -283,8 +283,7 @@ namespace Ryujinx.Ava.UI.Applet
Profiles
=
profiles
,
SelectedUserId
=
_parent
.
AccountManager
.
LastOpenedUser
.
UserId
};
UserSelectorDialog
content
=
new
(
viewModel
);
(
selected
,
_
)
=
await
UserSelectorDialog
.
ShowInputDialog
(
content
);
(
selected
,
_
)
=
await
UserSelectorDialog
.
ShowInputDialog
(
viewModel
);
dialogCloseEvent
.
Set
();
});
...
...
This diff is collapsed.
Click to expand it.
src/Ryujinx/UI/Applet/UserSelectorDialog.axaml.cs
+
10
−
13
View file @
06d34a59
...
...
@@ -79,7 +79,7 @@ namespace Ryujinx.Ava.UI.Applet
}
}
public
static
async
Task
<(
UserId
Id
,
bool
Result
)>
ShowInputDialog
(
UserSelectorDialog
content
)
public
static
async
Task
<(
UserId
Id
,
bool
Result
)>
ShowInputDialog
(
UserSelectorDialog
ViewModel
viewModel
)
{
ContentDialog
contentDialog
=
new
()
{
...
...
@@ -87,22 +87,25 @@ namespace Ryujinx.Ava.UI.Applet
PrimaryButtonText
=
LocaleManager
.
Instance
[
LocaleKeys
.
Continue
],
SecondaryButtonText
=
string
.
Empty
,
CloseButtonText
=
LocaleManager
.
Instance
[
LocaleKeys
.
Cancel
],
Content
=
content
,
Content
=
new
UserSelectorDialog
(
viewModel
)
,
Padding
=
new
Thickness
(
0
)
};
UserId
result
=
UserId
.
Null
;
bool
input
=
false
;
contentDialog
.
Closed
+=
Handler
;
await
ContentDialogHelper
.
ShowAsync
(
contentDialog
);
return
(
result
,
input
);
void
Handler
(
ContentDialog
sender
,
ContentDialogClosedEventArgs
eventArgs
)
{
if
(
eventArgs
.
Result
==
ContentDialogResult
.
Primary
)
{
if
(
contentDialog
.
Content
is
UserSelectorDialog
view
)
{
result
=
view
.
ViewModel
.
SelectedUserId
;
input
=
true
;
}
result
=
viewModel
.
SelectedUserId
;
input
=
true
;
}
else
{
...
...
@@ -110,12 +113,6 @@ namespace Ryujinx.Ava.UI.Applet
input
=
false
;
}
}
contentDialog
.
Closed
+=
Handler
;
await
ContentDialogHelper
.
ShowAsync
(
contentDialog
);
return
(
result
,
input
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment