Reload copay after saves preferences
This commit is contained in:
parent
6b8a561f6a
commit
cb6298c4b0
1 changed files with 7 additions and 4 deletions
|
|
@ -1,11 +1,10 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('applicationService', function($rootScope, $timeout, isCordova) {
|
||||
.factory('applicationService', function($rootScope, $timeout, isCordova, isChromeApp) {
|
||||
var root = {};
|
||||
|
||||
root.restart = function(hard) {
|
||||
if (isCordova) {
|
||||
$rootScope.iden = $rootScope.wallet = undefined;
|
||||
if (hard) {
|
||||
location.reload();
|
||||
}
|
||||
|
|
@ -15,8 +14,12 @@ angular.module('copayApp.services')
|
|||
|
||||
} else {
|
||||
// Go home reloading the application
|
||||
var hashIndex = window.location.href.indexOf('#!/');
|
||||
window.location = window.location.href.substr(0, hashIndex);
|
||||
var hashIndex = window.location.href.indexOf('#/');
|
||||
if (isChromeApp) {
|
||||
chrome.runtime.reload();
|
||||
} else {
|
||||
window.location = window.location.href.substr(0, hashIndex);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue