Ajout mesures anti-disparition de Pitaya en mode desktop
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
var Util = require('../../util');
|
||||
var logger = Util.Logger;
|
||||
var remote = require('remote');
|
||||
|
||||
var RUN_APP = exports.RUN_APP = 'RUN_APP';
|
||||
var RUN_APP_SUCCESS = exports.RUN_APP_SUCCESS = 'RUN_APP_SUCCESS';
|
||||
@ -16,10 +17,16 @@ exports.runApp = function(execPath) {
|
||||
return Util.System.runApp(execPath, { clearFreeDesktopFlags: true })
|
||||
.then(function() {
|
||||
dispatch({ type: RUN_APP_SUCCESS, execPath: execPath });
|
||||
// Hypothetical fix
|
||||
var win = remote.getCurrentWindow();
|
||||
win.show();
|
||||
return execPath;
|
||||
})
|
||||
.catch(function(err) {
|
||||
dispatch({ type: RUN_APP_FAILED, error: err });
|
||||
// Hypothetical fix
|
||||
var win = remote.getCurrentWindow();
|
||||
win.show();
|
||||
return err;
|
||||
})
|
||||
;
|
||||
|
Reference in New Issue
Block a user