mirror of https://github.com/laurent22/joplin.git
Linux: Fixes #3645: Prevent lock when restarting app
parent
085109288f
commit
815775ad8f
|
@ -1,4 +1,5 @@
|
|||
const { _, setLocale } = require('lib/locale.js');
|
||||
const { shim } = require('lib/shim');
|
||||
const { dirname, toSystemSlashes } = require('lib/path-utils.js');
|
||||
const { BrowserWindow, nativeTheme } = require('electron');
|
||||
|
||||
|
@ -183,11 +184,17 @@ class Bridge {
|
|||
}
|
||||
|
||||
restart() {
|
||||
const { app } = require('electron');
|
||||
|
||||
// Note that in this case we are not sending the "appClose" event
|
||||
// to notify services and component that the app is about to close
|
||||
// but for the current use-case it's not really needed.
|
||||
const { app } = require('electron');
|
||||
app.relaunch();
|
||||
if (shim.isLinux()) {
|
||||
this.showInfoMessageBox(_('The app is now going to close. Please relaunch it to complete the process.'));
|
||||
} else {
|
||||
app.relaunch();
|
||||
}
|
||||
|
||||
app.exit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue