State fixes
This commit is contained in:
@@ -58,14 +58,14 @@ export function useCommonHooks() {
|
||||
if (enabled.length === 0) {
|
||||
setTheme(themes[0]);
|
||||
save && setThemeName(themes[0].name);
|
||||
} else if (currentThemePlaylist !== 'All') {
|
||||
const index = Math.floor(Math.random() * themes.length);
|
||||
setTheme(themes[index]);
|
||||
save && setThemeName(themes[index].name);
|
||||
} else {
|
||||
} else if (currentThemePlaylist === 'All') {
|
||||
const index = Math.floor(Math.random() * enabled.length);
|
||||
setTheme(enabled[index]);
|
||||
save && setThemeName(enabled[index].name);
|
||||
} else {
|
||||
const index = Math.floor(Math.random() * themes.length);
|
||||
setTheme(themes[index]);
|
||||
save && setThemeName(themes[index].name);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user