Commit 8c884c1 1 parent 4d07de5 commit 8c884c1 Copy full SHA for 8c884c1
File tree 1 file changed +14
-10
lines changed
1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,22 @@ export default function App() {
38
38
ipcChannel . once ( 'get-available-themes' , ( systemsTemp ) => {
39
39
// Set current Selected theme
40
40
const currentTheme = localStorage . getItem ( 'current_theme' ) ;
41
+ let themeToCheck ;
41
42
if ( currentTheme ) {
42
- ipcChannel . sendMessage ( 'get-theme' , [ currentTheme ] ) ;
43
- ipcChannel . once ( 'get-theme' , ( theme ) => {
44
- setState ( {
45
- ...state ,
46
- themeName : currentTheme ,
47
- themes : systemsTemp ,
48
- userfolder : userFolder ,
49
- } ) ;
50
- setStateTheme ( { ...stateTheme , theme } ) ;
51
- } ) ;
43
+ themeToCheck = currentTheme ;
44
+ } else {
45
+ themeToCheck = 'default' ;
52
46
}
47
+ ipcChannel . sendMessage ( 'get-theme' , [ themeToCheck ] ) ;
48
+ ipcChannel . once ( 'get-theme' , ( theme ) => {
49
+ setState ( {
50
+ ...state ,
51
+ themeName : themeToCheck ,
52
+ themes : systemsTemp ,
53
+ userfolder : userFolder ,
54
+ } ) ;
55
+ setStateTheme ( { ...stateTheme , theme } ) ;
56
+ } ) ;
53
57
} ) ;
54
58
} ) ;
55
59
ipcChannel . sendMessage ( 'get-theme' , [ themeName ] ) ;
You can’t perform that action at this time.
0 commit comments