Replaces email-plugin by SocialShare (#4079)

This commit is contained in:
Gustavo Maximiliano Cortez 2016-04-15 10:26:51 -03:00 committed by Matias Alejo Garcia
parent ceeb8e69f0
commit a515d47a1e
4 changed files with 32 additions and 21 deletions

View File

@ -121,9 +121,6 @@ if [ ! -d $PROJECT ]; then
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard cordova plugin add https://github.com/VersoSolutions/CordovaClipboard
checkOK checkOK
cordova plugin add cordova-plugin-email-composer@0.8.3
checkOK
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare
checkOK checkOK

View File

@ -140,12 +140,18 @@ angular.module('copayApp.controllers').controller('exportController',
if ($scope.noSign) if ($scope.noSign)
name = name + '(No Private Key)'; name = name + '(No Private Key)';
var properties = { var subject = 'Copay Wallet Backup: ' + name;
subject: 'Copay Wallet Backup: ' + name, var body = 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}';
body: 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}', window.plugins.socialsharing.shareViaEmail(
isHtml: false body,
}; subject,
window.plugin.email.open(properties); null, // TO: must be null or an array
null, // CC: must be null or an array
null, // BCC: must be null or an array
null, // FILES: can be null, a string, or an array
function() {},
function() {}
);
}); });
}; };

View File

@ -80,12 +80,16 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
return ('* ' + v.address + ' ' + base + v.path.substring(1) + ' ' + formatDate(v.createdOn)); return ('* ' + v.address + ' ' + base + v.path.substring(1) + ' ' + formatDate(v.createdOn));
}).join("\n"); }).join("\n");
var properties = { window.plugins.socialsharing.shareViaEmail(
subject: 'Copay Addresses', body,
body: body, 'Copay Addresses',
isHtml: false null, // TO: must be null or an array
}; null, // CC: must be null or an array
window.plugin.email.open(properties); null, // BCC: must be null or an array
null, // FILES: can be null, a string, or an array
function() {},
function() {}
);
$timeout(function() { $timeout(function() {
$scope.$apply(); $scope.$apply();

View File

@ -11,11 +11,15 @@ function(historicLog) {
return v.msg; return v.msg;
}).join('\n'); }).join('\n');
var properties = { window.plugins.socialsharing.shareViaEmail(
subject: 'Copay Logs', body,
body: body, 'Copay Logs',
isHtml: false null, // TO: must be null or an array
}; null, // CC: must be null or an array
window.plugin.email.open(properties); null, // BCC: must be null or an array
null, // FILES: can be null, a string, or an array
function() {},
function() {}
);
}; };
}); });