Skip to content

Commit

Permalink
More SonarCloud fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxlider committed Dec 7, 2021
1 parent fb05ba7 commit ee33247
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions FASTER Maintenance/Models/ServerCfg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,12 @@ public string ProcessFile()
if (!missionSelectorChecked)
{
List<string> lines = new List<string> { "class Missions {" };
foreach (var mission in Missions.Where(m => m.MissionChecked))
foreach (var mission in Missions.Where(m => m.MissionChecked).Select(m => m.Name))
{
lines.AddRange(new List<string>
{
$"\tclass Mission_{Functions.SafeName(mission.Name)} {{",
$"\t\ttemplate = \"{mission.Name}\";",
$"\tclass Mission_{Functions.SafeName(mission)} {{",
$"\t\ttemplate = \"{mission}\";",
$"\t\tdifficulty = \"{Difficulty}\";",
"\t};"
});
Expand Down
6 changes: 3 additions & 3 deletions FASTER/Models/ServerCfg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -718,12 +718,12 @@ public string ProcessFile()
if (!missionSelectorChecked)
{
List<string> lines = new List<string> { "class Missions {" };
foreach (var mission in Missions.Where(m => m.MissionChecked))
foreach (var mission in Missions.Where(m => m.MissionChecked).Select(m => m.Name))
{
lines.AddRange(new List<string>
{
$"\tclass Mission_{Functions.SafeName(mission.Name)} {{",
$"\t\ttemplate = \"{mission.Name}\";",
$"\tclass Mission_{Functions.SafeName(mission)} {{",
$"\t\ttemplate = \"{mission}\";",
$"\t\tdifficulty = \"{Difficulty}\";",
"\t};"
});
Expand Down
4 changes: 2 additions & 2 deletions FASTER/ViewModel/SteamUpdaterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private SteamUpdaterViewModel(SteamUpdaterModel model)
public ObservableCollection<string> ServerBranches { get; } = new ObservableCollection<string> {"Stable", "Contact", "Creator DLC", "LegacyPorts", "Development", "Performance / Profiling"};
public string ServerBranch { get; set; } = "Stable";

public IDialogCoordinator dialogCoordinator { get; set; }
public IDialogCoordinator DialogCoordinator { get; set; }
private CancellationTokenSource tokenSource = new CancellationTokenSource();

public bool IsDownloading => DownloadTasks.Count > 0 || IsLoggingIn || IsDlOverride;
Expand Down Expand Up @@ -555,7 +555,7 @@ private async Task DownloadForMultiple(IDownloadHandler downloadHandler, string
}

public async Task<string> SteamGuardInput()
{ return await dialogCoordinator.ShowInputAsync(this, "Steam Guard", "Please enter your 2FA code"); }
{ return await DialogCoordinator.ShowInputAsync(this, "Steam Guard", "Please enter your 2FA code"); }

public event PropertyChangedEventHandler PropertyChanged;

Expand Down
2 changes: 1 addition & 1 deletion FASTER/Views/Updater.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class Updater
public Updater()
{
InitializeComponent();
MainWindow.Instance.SteamUpdaterViewModel.dialogCoordinator = DialogCoordinator.Instance;
MainWindow.Instance.SteamUpdaterViewModel.DialogCoordinator = DialogCoordinator.Instance;
DataContext = MainWindow.Instance.SteamUpdaterViewModel;
}

Expand Down

0 comments on commit ee33247

Please sign in to comment.