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';
|
'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 HISTORY_SHOW_LIMIT = 10;
|
||||||
var currentTxHistoryPage = 0;
|
var currentTxHistoryPage = 0;
|
||||||
|
@ -52,9 +52,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
var analyzeUtxos = function() {
|
var analyzeUtxos = function() {
|
||||||
if (analyzeUtxosDone) return;
|
if (analyzeUtxosDone) return;
|
||||||
|
|
||||||
feeService.getFeeLevels(function(err, levels){
|
feeService.getFeeLevels(function(err, levels) {
|
||||||
if (err) return;
|
if (err) return;
|
||||||
walletService.getLowUtxos($scope.wallet, levels, function(err, resp){
|
walletService.getLowUtxos($scope.wallet, levels, function(err, resp) {
|
||||||
if (err || !resp) return;
|
if (err || !resp) return;
|
||||||
analyzeUtxosDone = true;
|
analyzeUtxosDone = true;
|
||||||
$scope.lowUtxosWarning = resp.warning;
|
$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, {
|
walletService.getTxHistory($scope.wallet, {
|
||||||
progressFn: progressFn,
|
progressFn: progressFn,
|
||||||
feeLevels: levels,
|
feeLevels: levels,
|
||||||
|
@ -378,9 +378,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
refreshAmountSection();
|
refreshAmountSection();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
$scope.$on("$ionicView.afterLeave", function(event, data) {
|
||||||
|
|
||||||
if ($window.StatusBar) {
|
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() {
|
function setAndroidStatusBarColor() {
|
||||||
var SUBTRACT_AMOUNT = 15;
|
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);
|
var keys = Object.keys(rgb);
|
||||||
keys.forEach(function(k) {
|
keys.forEach(function(k) {
|
||||||
if (rgb[k] - SUBTRACT_AMOUNT < 0) {
|
if (rgb[k] - SUBTRACT_AMOUNT < 0) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ $v-wallet-color-map: (
|
||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
/* Theme */
|
/* Theme */
|
||||||
$v-default-wallet-color-index: 6 !default; // See $v-wallet-color-map
|
$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-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-hovering-box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.3) !default;
|
||||||
$v-subtle-radius: 3px !default;
|
$v-subtle-radius: 3px !default;
|
||||||
|
|
Loading…
Reference in New Issue