mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-11 04:37:49 +02:00
misc: chore: [ci skip] use MultiplayerInfoConverter instance instead of constructing for every use
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
<TextBlock
|
||||
HorizontalAlignment="Stretch"
|
||||
IsVisible="{Binding HasLdnGames}"
|
||||
Text="{Binding Converter={helpers:MultiplayerInfoConverter}}"
|
||||
Text="{Binding Converter={x:Static helpers:MultiplayerInfoConverter.Instance}}"
|
||||
TextAlignment="Start"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
@@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
return _instance;
|
||||
return Instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user