mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02:00
misc: chore: [ci skip] use MultiplayerInfoConverter instance instead of constructing for every use
This commit is contained in:
parent
4ae9f1c0d2
commit
4b1d94ccd8
2 changed files with 3 additions and 3 deletions
|
@ -141,7 +141,7 @@
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
IsVisible="{Binding HasLdnGames}"
|
IsVisible="{Binding HasLdnGames}"
|
||||||
Text="{Binding Converter={helpers:MultiplayerInfoConverter}}"
|
Text="{Binding Converter={x:Static helpers:MultiplayerInfoConverter.Instance}}"
|
||||||
TextAlignment="Start"
|
TextAlignment="Start"
|
||||||
TextWrapping="Wrap"/>
|
TextWrapping="Wrap"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
{
|
{
|
||||||
internal class MultiplayerInfoConverter : MarkupExtension, IValueConverter
|
internal class MultiplayerInfoConverter : MarkupExtension, IValueConverter
|
||||||
{
|
{
|
||||||
private static readonly MultiplayerInfoConverter _instance = new();
|
public static readonly MultiplayerInfoConverter Instance = new();
|
||||||
|
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
|
|
||||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||||
{
|
{
|
||||||
return _instance;
|
return Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue