diff --git a/public/index.html b/public/index.html index cd4ada852..36afe3f95 100644 --- a/public/index.html +++ b/public/index.html @@ -19,11 +19,12 @@ - + + diff --git a/public/views/includes/topbar.html b/public/views/includes/topbar.html index 6feeafdef..e47b1c061 100644 --- a/public/views/includes/topbar.html +++ b/public/views/includes/topbar.html @@ -1,7 +1,7 @@ - diff --git a/src/js/controllers/disclaimer.js b/src/js/controllers/disclaimer.js index 388906ab7..d125f8d06 100644 --- a/src/js/controllers/disclaimer.js +++ b/src/js/controllers/disclaimer.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('disclaimerController', - function($rootScope, $scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) { + function($scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) { var self = this; self.tries = 0; var isCordova = platformInfo.isCordova; @@ -62,7 +62,6 @@ angular.module('copayApp.controllers').controller('disclaimerController', if (err) $log.error(err); else { $ionicSideMenuDelegate.canDragContent(true); - $rootScope.$emit('disclaimerAccepted'); go.walletHome(); } }); diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 0fc126499..8e84d190a 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -18,6 +18,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r ret.historyShowMoreLimit = 10; ret.isSearching = false; ret.prevState = 'walletHome'; + ret.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width); ret.menu = [{ 'title': gettext('Receive'), @@ -60,13 +61,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); } - $timeout(function() { - $scope.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width) < 768; - profileService.isDisclaimerAccepted(function(val) { - $scope.isDisclaimerAccepted = val; - }); - }, 1); - function strip(number) { return (parseFloat(number.toPrecision(12))); }; @@ -1416,12 +1410,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.tab = 'walletHome'; }); - $rootScope.$on('disclaimerAccepted', function(event) { - profileService.isDisclaimerAccepted(function(val) { - $scope.isDisclaimerAccepted = val; - }); - }); - $rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) { if (self.isInFocus(walletId)) { @@ -1685,7 +1673,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); $rootScope.$on('Local/WindowResize', function() { - $scope.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width) < 768; + self.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width); }); $rootScope.$on('Local/NeedsConfirmation', function(event, txp, cb) {