Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check to ensure anniversary theme is only applied once. #501

Merged
merged 1 commit into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ModAssistant/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<setting name="SelectedTheme" serializeAs="String">
<value/>
</setting>
<setting name="AppliedAnniversaryTheme" serializeAs="String">
<value>False</value>
</setting>
<setting name="ReinstallInstalled" serializeAs="String">
<value>True</value>
</setting>
Expand Down
3 changes: 2 additions & 1 deletion ModAssistant/Classes/Themes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ public static void LoadThemes()
/// <param name="savedTheme">Theme name retrieved from the settings file.</param>
public static void FirstLoad(string savedTheme)
{
if (DateTime.Now.Date.ToString("MM/yyyy") == "05/2023")
if (!Properties.Settings.Default.AppliedAnniversaryTheme && DateTime.Now.Date.ToString("MM/yyyy") == "05/2023")
{
Properties.Settings.Default.AppliedAnniversaryTheme = true;
ApplyTheme("Anniversary", false);
return;
}
Expand Down
19 changes: 17 additions & 2 deletions ModAssistant/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.