Skip to content

Commit

Permalink
Make sure last applied theme is fully loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Windows10CE committed Jul 30, 2021
1 parent 0b8e036 commit 7324d7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PathfinderAPI/BaseGameFixes/Performance/ThemeCaching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ internal static bool SwitchToLastCustomTheme(object osObject, OSTheme theme)
if (theme == OSTheme.Custom)
{
// just dont question it
CachedThemes.BackingListHead?.Value?.ApplyTo((OS)osObject);
var lastTheme = CachedThemes.BackingListHead?.Value;
if (lastTheme != null)
{
if (!lastTheme.Loaded)
lastTheme.Load(true);
lastTheme.ApplyTo((OS)osObject);
}
return false;
}

Expand Down

0 comments on commit 7324d7f

Please sign in to comment.