mirror of
https://github.com/moparisthebest/mail
synced 2024-12-22 07:18:49 -05:00
Fix iframe resize issue on iOS
This commit is contained in:
parent
b8f21ac7eb
commit
19bdf0aa49
@ -52,16 +52,6 @@ var ReadCtrl = function($scope, $location, $q, email, invitation, outbox, pgp, k
|
||||
status.setReading(false);
|
||||
};
|
||||
|
||||
$scope.decrypt = function(message) {
|
||||
return $q(function(resolve) {
|
||||
resolve();
|
||||
}).then(function() {
|
||||
return email.decryptBody({
|
||||
message: message
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getKeyId = function(address) {
|
||||
if ($location.search().dev || !address) {
|
||||
return;
|
||||
|
@ -92,18 +92,7 @@ ngModule.directive('frameLoad', function($window) {
|
||||
function displayContent() {
|
||||
var mail = scope.state.mailList.selected;
|
||||
|
||||
if (!mail) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mail.encrypted && !mail.decrypted) {
|
||||
// decrypt current mail
|
||||
scope.decrypt(mail).then(function() {
|
||||
if (scope.state.mailList.selected === mail && mail.decrypted) {
|
||||
// decrypted mail is still selected, immidiately show body
|
||||
displayContent();
|
||||
}
|
||||
});
|
||||
if (!mail || (mail.encrypted && !mail.decrypted)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -63,21 +63,6 @@ describe('Read Controller unit test', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('decrypt', function() {
|
||||
it('should decrypt a message', function(done) {
|
||||
var msg = {};
|
||||
|
||||
emailMock.decryptBody.withArgs({
|
||||
message: msg
|
||||
}).returns(resolves());
|
||||
|
||||
scope.decrypt(msg).then(function() {
|
||||
expect(emailMock.decryptBody.calledOnce).to.be.true;
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getKeyId', function() {
|
||||
var address = 'asfd@asdf.com';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user