Fix reloading after restart app
This commit is contained in:
parent
1224f89c17
commit
9cebdbef42
3 changed files with 11 additions and 9 deletions
|
|
@ -3,18 +3,16 @@ angular.module('copayApp.services')
|
|||
.factory('applicationService', function($rootScope, $timeout, isCordova, isChromeApp) {
|
||||
var root = {};
|
||||
|
||||
root.restart = function(hard) {
|
||||
root.restart = function() {
|
||||
var hashIndex = window.location.href.indexOf('#/');
|
||||
if (isCordova) {
|
||||
if (hard) {
|
||||
location.reload();
|
||||
}
|
||||
window.location = window.location.href.substr(0, hashIndex);
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 1);
|
||||
|
||||
} else {
|
||||
// Go home reloading the application
|
||||
var hashIndex = window.location.href.indexOf('#/');
|
||||
if (isChromeApp) {
|
||||
chrome.runtime.reload();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue