Commit 19a57c5 1 parent fcbaade commit 19a57c5 Copy full SHA for 19a57c5
File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -162,19 +162,16 @@ function HomePage({ focusKey: focusKeyParam }) {
162
162
// Themes
163
163
ipcChannel . sendMessage ( 'get-available-themes' ) ;
164
164
ipcChannel . once ( 'get-available-themes' , ( systemsTemp ) => {
165
- console . log ( { systemsTemp } ) ;
166
- setState ( { ...state , themes : systemsTemp } ) ;
165
+ // Set current Selected theme
166
+ const currentTheme = localStorage . getItem ( 'current_theme' ) ;
167
+ if ( currentTheme ) {
168
+ ipcChannel . sendMessage ( 'get-theme' , [ currentTheme ] ) ;
169
+ ipcChannel . once ( 'get-theme' , ( theme ) => {
170
+ setState ( { ...state , themeName : currentTheme , themes : systemsTemp } ) ;
171
+ setStateTheme ( { ...stateTheme , theme } ) ;
172
+ } ) ;
173
+ }
167
174
} ) ;
168
-
169
- // Set current Selected theme.
170
- const currentTheme = localStorage . getItem ( 'current_theme' ) ;
171
- if ( currentTheme ) {
172
- ipcChannel . sendMessage ( 'get-theme' , [ currentTheme ] ) ;
173
- ipcChannel . once ( 'get-theme' , ( theme ) => {
174
- setState ( { ...state , themeName : theme } ) ;
175
- setStateTheme ( { ...stateTheme , theme } ) ;
176
- } ) ;
177
- }
178
175
} , [ ] ) ;
179
176
180
177
const onClickSetTheme = ( value ) => {
You can’t perform that action at this time.
0 commit comments