remove pull to refresh when side bar is open

This commit is contained in:
Gabriel Bazán 2016-06-22 13:00:17 -03:00
commit 04b093900e
3 changed files with 9 additions and 4 deletions

View file

@ -25,7 +25,7 @@
<!-- Main content -->
<ion-side-menu-content drag-content="index.isCordova">
<ion-side-menu-content drag-content="index.isCordova && index.allowSideBar">
<div notifications="right top"></div>
<div id="sectionContainer">
<div id="mainSection">

View file

@ -35,9 +35,10 @@
-->
<ion-content id="walletHome" class="walletHome tab-view tab-in" scroll="false" >
<ion-content overflow-scroll="true">
<ion-content overflow-scroll="true" on-release="index.allowSideBar = true; index.allowPullToRefresh = true;" on-drag-right="index.allowRefresher()">
<ion-refresher
ng-if="index.isCordova"
ng-if="index.allowPullToRefresh && index.isCordova"
on-pulling="index.allowSideBar = false"
pulling-icon="ion-ios-refresh"
spinner="ios-small"
on-refresh="index.updateAll({triggerTxUpdate: true})">

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, $ionicScrollDelegate, $ionicPopup, latestReleaseService, feeService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, addonManager, bwsError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, openURLService, ongoingProcess) {
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, $ionicScrollDelegate, $ionicPopup, $ionicSideMenuDelegate, latestReleaseService, feeService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, addonManager, bwsError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, openURLService, ongoingProcess) {
var self = this;
var SOFT_CONFIRMATION_LIMIT = 12;
var errors = bwcService.getErrors();
@ -68,6 +68,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
go.walletHome();
};
self.allowRefresher = function() {
if ($ionicSideMenuDelegate.getOpenRatio() != 0) self.allowPullToRefresh = false;
}
self.hideBalance = function() {
storageService.getHideBalanceFlag(self.walletId, function(err, shouldHideBalance) {
if (err) self.shouldHideBalance = false;