From 7c303900bb77fd8886c37745cfeee4017026adad Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 11 Sep 2015 14:44:52 -0300 Subject: [PATCH] Adds share button for customized amounts --- public/views/modals/customized-amount.html | 7 +++++++ src/js/controllers/walletHome.js | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/public/views/modals/customized-amount.html b/public/views/modals/customized-amount.html index af03b55de..1ed5fda6d 100644 --- a/public/views/modals/customized-amount.html +++ b/public/views/modals/customized-amount.html @@ -17,6 +17,13 @@

Details

diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index 10fe9ee20..3707b758a 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -462,6 +462,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $scope.unitDecimals = self.unitDecimals; var satToUnit = 1 / self.unitToSatoshi; $scope.showAlternative = false; + $scope.isCordova = isCordova; Object.defineProperty($scope, "_customAlternative", { @@ -516,6 +517,15 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi $scope.showAlternative = !$scope.showAlternative; }; + $scope.shareAddress = function(uri) { + if (isCordova) { + if (isMobile.Android() || isMobile.Windows()) { + window.ignoreMobilePause = true; + } + window.plugins.socialsharing.share(uri, null, null, null); + } + }; + $scope.cancel = function() { $modalInstance.dismiss('cancel'); };