mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-06 11:01:00 +08:00
fix: random theme is applied over custom theme (@fehmer) (#5900)
When having a custom theme applied and random theme set both get applied. Custom theme:  Custom theme mixed with chaos theory  Custom theme mixed with terrazzo 
This commit is contained in:
parent
2dcb1072e1
commit
921ecb113f
1 changed files with 2 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ import * as Misc from "../utils/misc";
|
|||
import * as Arrays from "../utils/arrays";
|
||||
import * as JSONData from "../utils/json-data";
|
||||
import { isColorDark, isColorLight } from "../utils/colors";
|
||||
import Config, { setAutoSwitchTheme } from "../config";
|
||||
import Config, { setAutoSwitchTheme, setCustomTheme } from "../config";
|
||||
import * as BackgroundFilter from "../elements/custom-background-filter";
|
||||
import * as ConfigEvent from "../observables/config-event";
|
||||
import * as DB from "../db";
|
||||
|
|
@ -302,6 +302,7 @@ export async function randomizeTheme(): Promise<void> {
|
|||
randomTheme = "custom";
|
||||
}
|
||||
|
||||
setCustomTheme(false, true);
|
||||
await apply(randomTheme, colorsOverride);
|
||||
|
||||
if (randomThemeIndex >= themesList.length) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue