misc: chore: Use collection expressions in Avalonia project

This commit is contained in:
Evan Husted 2025-01-26 15:47:11 -06:00
parent 46a5cafaa8
commit ae90db2040
28 changed files with 114 additions and 112 deletions

View file

@ -712,12 +712,13 @@ namespace Ryujinx.Ava.UI.Windows
private void ShowNewContentAddedDialog(int numDlcAdded, int numDlcRemoved, int numUpdatesAdded, int numUpdatesRemoved)
{
string[] messages = {
string[] messages =
[
numDlcRemoved > 0 ? string.Format(LocaleManager.Instance[LocaleKeys.AutoloadDlcRemovedMessage], numDlcRemoved): null,
numDlcAdded > 0 ? string.Format(LocaleManager.Instance[LocaleKeys.AutoloadDlcAddedMessage], numDlcAdded): null,
numUpdatesRemoved > 0 ? string.Format(LocaleManager.Instance[LocaleKeys.AutoloadUpdateRemovedMessage], numUpdatesRemoved): null,
numUpdatesAdded > 0 ? string.Format(LocaleManager.Instance[LocaleKeys.AutoloadUpdateAddedMessage], numUpdatesAdded) : null
};
];
string msg = String.Join("\r\n", messages);