mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Only prompt channel change once during enrollment
This commit is contained in:
parent
8a4adaec3a
commit
7caa59ead3
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class State
|
public class State
|
||||||
{
|
{
|
||||||
|
public string LastEnrolledChannel { get; set; } = "";
|
||||||
public string VersionGuid { get; set; } = "";
|
public string VersionGuid { get; set; } = "";
|
||||||
public List<string> ModManifest { get; set; } = new();
|
public List<string> ModManifest { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace Bloxstrap
|
|||||||
if (key == "channel" && !String.IsNullOrEmpty(val))
|
if (key == "channel" && !String.IsNullOrEmpty(val))
|
||||||
{
|
{
|
||||||
channelArgPresent = true;
|
channelArgPresent = true;
|
||||||
ChangeChannel(val);
|
EnrollChannel(val);
|
||||||
|
|
||||||
// we'll set the arg when launching
|
// we'll set the arg when launching
|
||||||
continue;
|
continue;
|
||||||
@ -65,7 +65,7 @@ namespace Bloxstrap
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!channelArgPresent)
|
if (!channelArgPresent)
|
||||||
ChangeChannel(RobloxDeployment.DefaultChannel);
|
EnrollChannel(RobloxDeployment.DefaultChannel);
|
||||||
|
|
||||||
return commandLine.ToString();
|
return commandLine.ToString();
|
||||||
}
|
}
|
||||||
@ -80,9 +80,12 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic)
|
if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic)
|
||||||
{
|
{
|
||||||
|
if (channel == App.State.Prop.LastEnrolledChannel)
|
||||||
|
return;
|
||||||
|
|
||||||
MessageBoxResult result = Controls.ShowMessageBox(
|
MessageBoxResult result = Controls.ShowMessageBox(
|
||||||
$"Roblox is attempting to set your channel to {channel}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" +
|
$"Roblox is attempting to set your channel to {channel}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" +
|
||||||
$"Would you like to switch channels from {App.Settings.Prop.Channel} to {channel}?",
|
$"Would you like to switch your preferred channel to {channel}?",
|
||||||
MessageBoxImage.Question,
|
MessageBoxImage.Question,
|
||||||
MessageBoxButton.YesNo
|
MessageBoxButton.YesNo
|
||||||
);
|
);
|
||||||
@ -95,6 +98,13 @@ namespace Bloxstrap
|
|||||||
App.Settings.Prop.Channel = channel;
|
App.Settings.Prop.Channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void EnrollChannel(string channel)
|
||||||
|
{
|
||||||
|
ChangeChannel(channel);
|
||||||
|
App.State.Prop.LastEnrolledChannel = channel;
|
||||||
|
App.State.Save();
|
||||||
|
}
|
||||||
|
|
||||||
public static void Register(string key, string name, string handler)
|
public static void Register(string key, string name, string handler)
|
||||||
{
|
{
|
||||||
string handlerArgs = $"\"{handler}\" %1";
|
string handlerArgs = $"\"{handler}\" %1";
|
||||||
|
Loading…
Reference in New Issue
Block a user