Use ToLowerInvariant() instead of ToLower() (#268)

oops
This commit is contained in:
pizzaboxer 2023-05-27 19:25:33 +01:00
parent cec5c58e7c
commit cf1514d6be
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
4 changed files with 7 additions and 7 deletions

View File

@ -219,7 +219,7 @@ namespace Bloxstrap
ClientVersion clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel); ClientVersion clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel);
// briefly check if current channel is suitable to use // briefly check if current channel is suitable to use
if (App.Settings.Prop.Channel.ToLower() != RobloxDeployment.DefaultChannel.ToLower() && App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Ignore) if (App.Settings.Prop.Channel.ToLowerInvariant() != RobloxDeployment.DefaultChannel.ToLowerInvariant() && App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Ignore)
{ {
string? switchDefaultPrompt = null; string? switchDefaultPrompt = null;
ClientVersion? defaultChannelInfo = null; ClientVersion? defaultChannelInfo = null;
@ -272,8 +272,8 @@ namespace Bloxstrap
_launchCommandLine = _launchCommandLine.Replace("LAUNCHTIMEPLACEHOLDER", DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString()); _launchCommandLine = _launchCommandLine.Replace("LAUNCHTIMEPLACEHOLDER", DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString());
if (App.Settings.Prop.Channel.ToLower() != RobloxDeployment.DefaultChannel.ToLower()) if (App.Settings.Prop.Channel.ToLowerInvariant() != RobloxDeployment.DefaultChannel.ToLowerInvariant())
_launchCommandLine += " -channel " + App.Settings.Prop.Channel.ToLower(); _launchCommandLine += " -channel " + App.Settings.Prop.Channel.ToLowerInvariant();
// whether we should wait for roblox to exit to handle stuff in the background or clean up after roblox closes // whether we should wait for roblox to exit to handle stuff in the background or clean up after roblox closes
bool shouldWait = false; bool shouldWait = false;

View File

@ -57,7 +57,7 @@ namespace Bloxstrap
if (key == "channel") if (key == "channel")
{ {
if (val.ToLower() != App.Settings.Prop.Channel.ToLower() && App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Ignore) if (val.ToLowerInvariant() != App.Settings.Prop.Channel.ToLowerInvariant() && App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Ignore)
{ {
MessageBoxResult result = App.Settings.Prop.ChannelChangeMode == ChannelChangeMode.Automatic ? MessageBoxResult.Yes : App.ShowMessageBox( MessageBoxResult result = App.Settings.Prop.ChannelChangeMode == ChannelChangeMode.Automatic ? MessageBoxResult.Yes : App.ShowMessageBox(
$"{App.ProjectName} was launched with the Roblox build channel set to {val}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" + $"{App.ProjectName} was launched with the Roblox build channel set to {val}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" +

View File

@ -78,8 +78,8 @@ namespace Bloxstrap
string location = BaseUrl; string location = BaseUrl;
if (channel.ToLower() != DefaultChannel.ToLower()) if (channel.ToLowerInvariant() != DefaultChannel.ToLowerInvariant())
location += $"/channel/{channel.ToLower()}"; location += $"/channel/{channel.ToLowerInvariant()}";
location += resource; location += resource;

View File

@ -104,7 +104,7 @@ namespace Bloxstrap.ViewModels
if (!value) if (!value)
{ {
// roblox typically sets channels in all lowercase, so here we find if a case insensitive match exists // roblox typically sets channels in all lowercase, so here we find if a case insensitive match exists
string? matchingChannel = Channels.Where(x => x.ToLower() == Channel.ToLower()).FirstOrDefault(); string? matchingChannel = Channels.Where(x => x.ToLowerInvariant() == Channel.ToLowerInvariant()).FirstOrDefault();
Channel = String.IsNullOrEmpty(matchingChannel) ? RobloxDeployment.DefaultChannel : matchingChannel; Channel = String.IsNullOrEmpty(matchingChannel) ? RobloxDeployment.DefaultChannel : matchingChannel;
} }