misc: chore: Use collection expressions

This commit is contained in:
KeatonTheBot 2025-03-06 20:46:29 -06:00
parent 4d5757417e
commit e2973a875a
236 changed files with 9843 additions and 7561 deletions

View file

@ -719,12 +719,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);