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 { _, setLocale } = require('lib/locale.js');
|
||||||
|
const { shim } = require('lib/shim');
|
||||||
const { dirname, toSystemSlashes } = require('lib/path-utils.js');
|
const { dirname, toSystemSlashes } = require('lib/path-utils.js');
|
||||||
const { BrowserWindow, nativeTheme } = require('electron');
|
const { BrowserWindow, nativeTheme } = require('electron');
|
||||||
|
|
||||||
|
@ -183,11 +184,17 @@ class Bridge {
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
|
const { app } = require('electron');
|
||||||
|
|
||||||
// Note that in this case we are not sending the "appClose" event
|
// Note that in this case we are not sending the "appClose" event
|
||||||
// to notify services and component that the app is about to close
|
// to notify services and component that the app is about to close
|
||||||
// but for the current use-case it's not really needed.
|
// but for the current use-case it's not really needed.
|
||||||
const { app } = require('electron');
|
if (shim.isLinux()) {
|
||||||
app.relaunch();
|
this.showInfoMessageBox(_('The app is now going to close. Please relaunch it to complete the process.'));
|
||||||
|
} else {
|
||||||
|
app.relaunch();
|
||||||
|
}
|
||||||
|
|
||||||
app.exit();
|
app.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue