fix: bgm加载时机调整

This commit is contained in:
streakingman
2022-09-22 10:09:06 +08:00
parent aa2d11a096
commit f0e2caf7a7
2 changed files with 9 additions and 6 deletions
+7 -4
View File
@@ -186,11 +186,14 @@ const App: FC = () => {
// 主题切换
useEffect(() => {
setBgmOn(false);
// 初始化时不加载bgm
if (once) {
setBgmOn(false);
setTimeout(() => {
setBgmOn(true);
}, 300);
}
restart();
setTimeout(() => {
setBgmOn(true);
}, 300);
}, [curTheme]);
// 队列区排序