We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e94037 commit 233535fCopy full SHA for 233535f
redisinsight/ui/src/contexts/themeContext.tsx
@@ -41,13 +41,14 @@ export class ThemeProvider extends React.Component<Props> {
41
42
changeTheme = async (themeValue: any) => {
43
let actualTheme = themeValue
44
- if (themeValue === Theme.System) {
45
- actualTheme = this.getSystemTheme()
46
- }
47
48
// since change theme is async need to wait to have a proper prefers-color-scheme
49
await ipcThemeChange(themeValue)
50
+ if (themeValue === Theme.System) {
+ actualTheme = this.getSystemTheme()
+ }
51
+
52
this.setState({ theme: actualTheme, usingSystemTheme: themeValue === Theme.System }, () => {
53
themeService.applyTheme(themeValue)
54
})
0 commit comments