remove external services for this first release and general refactors

This commit is contained in:
Gabriel Bazán 2017-06-08 15:09:39 -03:00
commit 95f3ddf01a
11 changed files with 36 additions and 32 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $log, configService) {
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $log, configService, platformInfo) {
var updateConfig = function() {
var config = configService.getSync();
@ -50,6 +50,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
updateConfig();
});

View file

@ -5,7 +5,8 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
$scope.appName = appConfigService.nameCase;
var isAndroid = platformInfo.isAndroid;
var isIOS = platformInfo.isIOS;
var isWP = platformInfo.isWP;
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
var config = configService.getSync();
$scope.skip = function() {
@ -42,7 +43,7 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
url = $scope.appName == 'Copay' ? defaults.rateApp.copay.android : defaults.rateApp.bitpay.android;
if (isIOS)
url = $scope.appName == 'Copay' ? defaults.rateApp.copay.ios : defaults.rateApp.bitpay.ios;
// if (isWP)
// if (isWindowsPhoneApp)
// url = $scope.appName == 'Copay' ? defaults.rateApp.copay.windows : defaults.rateApp.bitpay.windows;
externalLinkService.open(url);

View file

@ -120,7 +120,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
};
$scope.openScanner = function() {
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
if (!isWindowsPhoneApp) {
$state.go('tabs.scan');

View file

@ -24,7 +24,7 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
$scope.chooseScanner = function() {
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
if (!isWindowsPhoneApp) {
$state.go('tabs.scan');