File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
browser/main/modals/PreferencesModal Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,20 @@ class HotkeyTab extends React.Component {
28
28
} } )
29
29
}
30
30
this . handleSettingError = ( err ) => {
31
- this . setState ( { keymapAlert : {
32
- type : 'error' ,
33
- message : err . message != null ? err . message : i18n . __ ( 'An error occurred!' )
34
- } } )
31
+ if (
32
+ this . state . config . hotkey . toggleMain === '' ||
33
+ this . state . config . hotkey . toggleMode === ''
34
+ ) {
35
+ this . setState ( { keymapAlert : {
36
+ type : 'success' ,
37
+ message : i18n . __ ( 'Successfully applied!' )
38
+ } } )
39
+ } else {
40
+ this . setState ( { keymapAlert : {
41
+ type : 'error' ,
42
+ message : err . message != null ? err . message : i18n . __ ( 'An error occurred!' )
43
+ } } )
44
+ }
35
45
}
36
46
this . oldHotkey = this . state . config . hotkey
37
47
ipc . addListener ( 'APP_SETTING_DONE' , this . handleSettingDone )
You can’t perform that action at this time.
0 commit comments