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 screenInactive = true;
|
||||
|
||||
function getScrollPosition() {
|
||||
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
|
||||
if (!scrollPosition) {
|
||||
if (!scrollPosition || screenInactive) {
|
||||
$window.requestAnimationFrame(function() {
|
||||
getScrollPosition();
|
||||
});
|
||||
|
|
@ -283,6 +284,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var scrollWatcherInitialized;
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$timeout(function() {
|
||||
screenInactive = false;
|
||||
}, 200);
|
||||
if (scrollWatcherInitialized || !$scope.amountIsCollapsible) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -324,6 +328,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
// });
|
||||
|
||||
$scope.$on("$ionicView.leave", function(event, data) {
|
||||
screenInactive = true;
|
||||
lodash.each(listeners, function(x) {
|
||||
x();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
on-refresh="onRefresh()">
|
||||
</ion-refresher>
|
||||
|
||||
<div class="amount-wrapper" ng-show="wallet && wallet.isComplete() && !amountIsCollapsible">
|
||||
<div class="amount-wrapper" ng-if="wallet && wallet.isComplete() && !amountIsCollapsible">
|
||||
<div
|
||||
class="amount-bg"
|
||||
ng-style="{'background-color':wallet.color}"
|
||||
|
|
@ -139,11 +139,11 @@
|
|||
</div>
|
||||
</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
|
||||
</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="text-center text-warning">
|
||||
<i class="fi-alert"></i>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue