Skip to content

Commit

Permalink
Channel Update adjust detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Sora-yx committed Oct 14, 2024
1 parent 05f4637 commit 69d5935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SA-Mod-Manager/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public partial class App : Application
public static bool IsLightTheme = false;
public static ThemeList ThemeList { get; set; }
public static List<string> UpdateChannels { get; set; } = ["Release", "Development"];
public static string CurrentChannel { get; set; }
public static string CurrentChannel { get; set; } = string.IsNullOrEmpty(RepoCommit) ? UpdateChannels[0] : UpdateChannels[1];

public static Game CurrentGame = new();
public static List<Game> GamesList = new();
Expand Down
2 changes: 1 addition & 1 deletion SA-Mod-Manager/UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2913,7 +2913,7 @@ private async void ComboBoxChannel_SelectionChanged(object sender, SelectionChan
if (suppressEvent)
return;

bool isDev = Title.Contains("Dev");
bool isDev = !string.IsNullOrEmpty(App.RepoCommit);
string currentChannel = isDev ? App.UpdateChannels[1] : App.UpdateChannels[0];

if (comboUpdateChannel.SelectedItem != null && currentChannel != comboUpdateChannel.SelectedItem as string)
Expand Down

0 comments on commit 69d5935

Please sign in to comment.