ion refresher, ion infinite scroll and balance collapse

This commit is contained in:
Gabriel Bazán 2016-05-17 11:10:16 -03:00 committed by Javier
commit dae55abceb
9 changed files with 213 additions and 187 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) {
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $ionicScrollDelegate, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) {
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
@ -32,6 +32,13 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
ret.sendMaxInfo = {};
var vanillaScope = ret;
$scope.getScrollPosition = function() {
$scope.shouldCollapse = $ionicScrollDelegate.$getByHandle('transactions').getScrollPosition().top > 50;
$timeout(function() {
$scope.$apply();
});
}
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
self.setForm(data);
$rootScope.$emit('Local/SetTab', 'send');