add scroll top when switch wallet

This commit is contained in:
Gabriel Bazán 2016-05-20 11:58:47 -03:00 committed by Javier
commit 501731571b

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('sidebarController',
function($rootScope, $timeout, lodash, profileService, configService, go, platformInfo) {
function($rootScope, $timeout, $ionicScrollDelegate, lodash, profileService, configService, go, platformInfo) {
var self = this;
self.isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
self.walletSelection = false;
@ -28,6 +28,7 @@ angular.module('copayApp.controllers').controller('sidebarController',
if (selectedWalletId == currentWalletId) return;
self.walletSelection = false;
profileService.setAndStoreFocus(selectedWalletId, function() {});
$ionicScrollDelegate.$getByHandle('transactions').scrollTop();
};
self.toggleWalletSelection = function() {