Fixes restart desktop application
This commit is contained in:
parent
be6c132fbc
commit
36b6efa9e4
1 changed files with 12 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.services')
|
angular.module('copayApp.services')
|
||||||
.factory('applicationService', function($rootScope, $timeout, isCordova, isChromeApp) {
|
.factory('applicationService', function($rootScope, $timeout, isCordova, isChromeApp, nodeWebkit, go) {
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
root.restart = function() {
|
root.restart = function() {
|
||||||
|
|
@ -14,7 +14,17 @@ angular.module('copayApp.services')
|
||||||
} else {
|
} else {
|
||||||
// Go home reloading the application
|
// Go home reloading the application
|
||||||
if (isChromeApp) {
|
if (isChromeApp) {
|
||||||
chrome.runtime.reload();
|
if (nodeWebkit.isDefined()) {
|
||||||
|
go.walletHome();
|
||||||
|
$timeout(function() {
|
||||||
|
var win = require('nw.gui').Window.get();
|
||||||
|
win.reload(3);
|
||||||
|
//or
|
||||||
|
win.reloadDev();
|
||||||
|
}, 100);
|
||||||
|
} else {
|
||||||
|
chrome.runtime.reload();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
window.location = window.location.href.substr(0, hashIndex);
|
window.location = window.location.href.substr(0, hashIndex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue