From 336dc6896ae2baa6b1985356fe0f6d564972cdfe Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Sat, 5 Mar 2022 11:44:37 +0300 Subject: [PATCH] Wait system theme to catch up status Signed-off-by: Alex Andreev --- src/renderer/theme.store.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/theme.store.ts b/src/renderer/theme.store.ts index d46c5af058..701d389831 100644 --- a/src/renderer/theme.store.ts +++ b/src/renderer/theme.store.ts @@ -93,7 +93,11 @@ export class ThemeStore extends Singleton { makeObservable(this); autoBind(this); - this.setNativeTheme(); + this.init(); + } + + async init() { + await this.setNativeTheme(); this.bindNativeThemeUpdateEvent(); // auto-apply active theme