Browse Source

UI: Fix Twitch panels not using dark first time

When the panels start up for the very first time, the dark theme is not
used due to the local storage variable not being set by the first panel.
When the program is restarted, it'll be dark from then on out because
it's set by the secondary panels rather than the primary panel.  This
modifies it so that the locale storage variable is properly set by the
primary panel.
jp9000 6 năm trước cách đây
mục cha
commit
a03ade631f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      UI/auth-twitch.cpp

+ 2 - 1
UI/auth-twitch.cpp

@@ -216,7 +216,8 @@ void TwitchAuth::LoadUI()
 	chat->SetWidget(browser);
 	cef->add_force_popup_url(moderation_tools_url, chat.data());
 
-	script = bttv_script;
+	script = "localStorage.setItem('twilight.theme', 1);";
+	script += bttv_script;
 	script += ffz_script;
 	browser->setStartupScript(script);