prevent ugly flashes on iOS
This commit is contained in:
parent
64d81c55ba
commit
7a2ee02899
2 changed files with 9 additions and 4 deletions
|
|
@ -234,10 +234,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
};
|
};
|
||||||
|
|
||||||
var prevPos;
|
var prevPos;
|
||||||
|
var screenInactive = true;
|
||||||
|
|
||||||
function getScrollPosition() {
|
function getScrollPosition() {
|
||||||
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
|
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
|
||||||
if (!scrollPosition) {
|
if (!scrollPosition || screenInactive) {
|
||||||
$window.requestAnimationFrame(function() {
|
$window.requestAnimationFrame(function() {
|
||||||
getScrollPosition();
|
getScrollPosition();
|
||||||
});
|
});
|
||||||
|
|
@ -283,6 +284,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
var scrollWatcherInitialized;
|
var scrollWatcherInitialized;
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data) {
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
|
$timeout(function() {
|
||||||
|
screenInactive = false;
|
||||||
|
}, 200);
|
||||||
if (scrollWatcherInitialized || !$scope.amountIsCollapsible) {
|
if (scrollWatcherInitialized || !$scope.amountIsCollapsible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -324,6 +328,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
// });
|
// });
|
||||||
|
|
||||||
$scope.$on("$ionicView.leave", function(event, data) {
|
$scope.$on("$ionicView.leave", function(event, data) {
|
||||||
|
screenInactive = true;
|
||||||
lodash.each(listeners, function(x) {
|
lodash.each(listeners, function(x) {
|
||||||
x();
|
x();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
on-refresh="onRefresh()">
|
on-refresh="onRefresh()">
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
|
|
||||||
<div class="amount-wrapper" ng-show="wallet && wallet.isComplete() && !amountIsCollapsible">
|
<div class="amount-wrapper" ng-if="wallet && wallet.isComplete() && !amountIsCollapsible">
|
||||||
<div
|
<div
|
||||||
class="amount-bg"
|
class="amount-bg"
|
||||||
ng-style="{'background-color':wallet.color}"
|
ng-style="{'background-color':wallet.color}"
|
||||||
|
|
@ -139,11 +139,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- oh -->
|
</div> <!-- oh -->
|
||||||
|
|
||||||
<a class="wallet-not-backed-up-warning" ng-show="!isBackedUp" ui-sref="tabs.wallet.backupWarning({from: 'tabs.wallet', walletId: walletId})">
|
<a class="wallet-not-backed-up-warning" ng-if="!isBackedUp" ui-sref="tabs.wallet.backupWarning({from: 'tabs.wallet', walletId: walletId})">
|
||||||
Wallet not backed up
|
Wallet not backed up
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="p60b" ng-show="wallet && wallet.isComplete() && !walletNotRegistered" style="padding-top: 1rem;">
|
<div class="p60b" ng-if="wallet && wallet.isComplete() && !walletNotRegistered" style="padding-top: 1rem;">
|
||||||
<div class="oh pr m20t" ng-show="wallet.incorrectDerivation">
|
<div class="oh pr m20t" ng-show="wallet.incorrectDerivation">
|
||||||
<div class="text-center text-warning">
|
<div class="text-center text-warning">
|
||||||
<i class="fi-alert"></i>
|
<i class="fi-alert"></i>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue