From 1aff66091be6c402f9f20f71c942bfeaa788db94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 20 Jul 2016 17:16:15 -0300 Subject: [PATCH] fix sidebar hamburger when changing wallet --- src/js/controllers/index.js | 1 + src/js/routes.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index be1713459..2a070cfc1 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -98,6 +98,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r if (k == 'tab') return; if (k == 'noFocusedWallet') return; if (k == 'backgroundColor') return; + if (k == 'physicalScreenWidth') return; if (k == 'loadingWallet') { self.loadingWallet = true; return; diff --git a/src/js/routes.js b/src/js/routes.js index 700eb99e4..c2e97747f 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -508,7 +508,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); }) - .run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, platformInfo, profileService, uxLanguage, go, gettextCatalog) { + .run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, go, gettextCatalog) { if (platformInfo.isCordova) { if (screen.width < 768) { @@ -527,9 +527,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } } else { if (screen.width >= 768) { - window.addEventListener('resize', function() { + window.addEventListener('resize', lodash.throttle(function() { $rootScope.$emit('Local/WindowResize'); - }); + }, 100)); } }