fix controllers

This commit is contained in:
Matias Alejo Garcia 2016-05-31 19:02:00 -03:00
commit 800ca91ad6
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
7 changed files with 13 additions and 10 deletions

View file

@ -1,8 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesGlobalController',
function($scope, $rootScope, $log, configService, uxLanguage, isCordova, isMobile, pushNotificationsService, profileService, feeService) {
function($scope, $rootScope, $log, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
var isCordova = platformInfo.isCordova;
this.init = function() {
var config = configService.getSync();
this.unitName = config.wallet.settings.unitName;
@ -13,9 +14,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
};
this.feeOpts = feeService.feeOpts;
this.currentFeeLevel = feeService.getCurrentFeeLevel();
this.usePushNotifications = isCordova && !isMobile.Windows();
this.usePushNotifications = isCordova && !platformInfo.isWP;
$scope.PNEnabledByUser = true;
$scope.isIOSApp = isMobile.iOS() && isCordova;
$scope.isIOSApp = platformInfo.isIOS && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;