1
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
a03ade631f
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  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);