mirror of https://github.com/BTCPrivate/copay.git
fix statusbar color when leaving history view
This commit is contained in:
parent
18ed4d6cfd
commit
de4b614e6f
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService) {
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
@ -52,9 +52,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var analyzeUtxos = function() {
|
||||
if (analyzeUtxosDone) return;
|
||||
|
||||
feeService.getFeeLevels(function(err, levels){
|
||||
feeService.getFeeLevels(function(err, levels) {
|
||||
if (err) return;
|
||||
walletService.getLowUtxos($scope.wallet, levels, function(err, resp){
|
||||
walletService.getLowUtxos($scope.wallet, levels, function(err, resp) {
|
||||
if (err || !resp) return;
|
||||
analyzeUtxosDone = true;
|
||||
$scope.lowUtxosWarning = resp.warning;
|
||||
|
@ -171,7 +171,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
feeService.getFeeLevels(function(err, levels){
|
||||
feeService.getFeeLevels(function(err, levels) {
|
||||
walletService.getTxHistory($scope.wallet, {
|
||||
progressFn: progressFn,
|
||||
feeLevels: levels,
|
||||
|
@ -378,9 +378,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
refreshAmountSection();
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
||||
$scope.$on("$ionicView.afterLeave", function(event, data) {
|
||||
|
||||
if ($window.StatusBar) {
|
||||
$window.StatusBar.backgroundColorByHexString('#1e3186');
|
||||
var statusBarColor = appConfigService.name == 'copay' ? '#192c3a' : '#1e3186';
|
||||
$window.StatusBar.backgroundColorByHexString(statusBarColor);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -392,7 +394,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
|
||||
function setAndroidStatusBarColor() {
|
||||
var SUBTRACT_AMOUNT = 15;
|
||||
var rgb = hexToRgb($scope.wallet.color);
|
||||
var walletColor;
|
||||
if (!$scope.wallet.color) walletColor = appConfigService.name == 'copay' ? '#019477' : '#4a90e2';
|
||||
else walletColor = $scope.wallet.color;
|
||||
var rgb = hexToRgb(walletColor);
|
||||
var keys = Object.keys(rgb);
|
||||
keys.forEach(function(k) {
|
||||
if (rgb[k] - SUBTRACT_AMOUNT < 0) {
|
||||
|
|
|
@ -43,8 +43,8 @@ $v-wallet-color-map: (
|
|||
13: (color: #7a8c9e, name: 'Light Slate Grey')
|
||||
) !default;
|
||||
|
||||
/* Theme */
|
||||
$v-default-wallet-color-index: 6 !default; // See $v-wallet-color-map
|
||||
/* Theme */
|
||||
$v-default-wallet-color-index: 8 !default; // See $v-wallet-color-map
|
||||
$v-subtle-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !default;
|
||||
$v-hovering-box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3) !default;
|
||||
$v-subtle-radius: 3px !default;
|
||||
|
|
Loading…
Reference in New Issue