Prompt to restart Atom when the file system watcher setting changes

I experimented with just reloading the Window, but ran into problems. 
I'm also worried about a situation where there are multiple windows. 
Since this setting should be changed rarely, I think prompting for a 
restart is an expedient solution.
This commit is contained in:
Nathan Sobo
2019-05-02 15:10:10 -06:00
parent f8d7c9cbce
commit da52d167cc
2 changed files with 2 additions and 1 deletions

View File

@@ -329,7 +329,7 @@ const configSchema = {
default: 40
},
fileSystemWatcher: {
description: 'Choose the underlying implementation used to watch for filesystem changes. Emulating changes will miss any events caused by applications other than Atom, but may help prevent crashes or freezes.',
description: 'Choose the underlying implementation used to watch for filesystem changes. Emulating changes will miss any events caused by applications other than Atom, but may help prevent crashes or freezes.<br>This setting will require a relaunch of Atom to take effect.',
type: 'string',
default: 'experimental',
enum: [

View File

@@ -271,6 +271,7 @@ class AtomApplication extends EventEmitter {
}
this.config.onDidChange('core.titleBar', () => this.promptForRestart())
this.config.onDidChange('core.colorProfile', () => this.promptForRestart())
this.config.onDidChange('core.fileSystemWatcher', () => this.promptForRestart())
}
let optionsForWindowsToOpen = []