Skip to content

Commit 04c9d86

Browse files
AlexMacocianAlexandru Macocian
andcommitted
Uniformize executables and launch configs UI (Closes #1178) (#1185)
Co-authored-by: Alexandru Macocian <amacocian@microsoft.com>
1 parent 0d30adf commit 04c9d86

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Daybreak/Services/ExecutableManagement/GuildWarsExecutableManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void AddExecutable(string executablePath)
3737
var list = this.liveUpdateableOptions.Value.ExecutablePaths;
3838
if (list.None(e => e == executablePath))
3939
{
40-
list.Add(executablePath);
40+
list.Insert(0, executablePath);
4141
}
4242

4343
this.liveUpdateableOptions.Value.ExecutablePaths = list;

Daybreak/Services/LaunchConfigurations/LaunchConfigurationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private bool SaveConfigurationInternal(LaunchConfigurationWithCredentials launch
111111
return true;
112112
}
113113

114-
configs.Add(new LaunchConfiguration
114+
configs.Insert(0, new LaunchConfiguration
115115
{
116116
Name = launchConfigurationWithCredentials.Name,
117117
CredentialsIdentifier = launchConfigurationWithCredentials.Credentials?.Identifier,

Daybreak/Views/ExecutablesView.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public void CreateExecutable()
5151
NeedsUpdate = false
5252
};
5353

54-
this.Executables.Add(newExecutable);
54+
this.Executables.Insert(0, newExecutable);
5555
this.guildWarsExecutableManager.AddExecutable(newExecutable.Path);
56-
Task.Run(() => this.ValidateExecutables());
56+
Task.Run(this.ValidateExecutables);
5757
}
5858

5959
public void ModifyPath(ExecutablePath executable)

Daybreak/Views/LaunchConfigurationsView.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void CreateNewLaunchConfiguration()
4040
config.Credentials = this.Credentials.FirstOrDefault();
4141
config.ExecutablePath = this.Executables.FirstOrDefault();
4242
this.launchConfigurationService.SaveConfiguration(config);
43-
this.LaunchConfigurations.Add(config);
43+
this.LaunchConfigurations.Insert(0, config);
4444
}
4545

4646
public void ExecutableChanged(LaunchConfigurationWithCredentials configuration, string newValue)

0 commit comments

Comments
 (0)