mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-15 04:14:47 +00: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
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue