Skip to content

Commit 233535f

Browse files
committed
RI-6351 fix theme
1 parent 3e94037 commit 233535f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

redisinsight/ui/src/contexts/themeContext.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ export class ThemeProvider extends React.Component<Props> {
4141

4242
changeTheme = async (themeValue: any) => {
4343
let actualTheme = themeValue
44-
if (themeValue === Theme.System) {
45-
actualTheme = this.getSystemTheme()
46-
}
4744

4845
// since change theme is async need to wait to have a proper prefers-color-scheme
4946
await ipcThemeChange(themeValue)
5047

48+
if (themeValue === Theme.System) {
49+
actualTheme = this.getSystemTheme()
50+
}
51+
5152
this.setState({ theme: actualTheme, usingSystemTheme: themeValue === Theme.System }, () => {
5253
themeService.applyTheme(themeValue)
5354
})

0 commit comments

Comments
 (0)