mirror of
https://github.com/moparisthebest/mail
synced 2024-12-21 23:08:50 -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);
|
status.setReading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.decrypt = function(message) {
|
|
||||||
return $q(function(resolve) {
|
|
||||||
resolve();
|
|
||||||
}).then(function() {
|
|
||||||
return email.decryptBody({
|
|
||||||
message: message
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.getKeyId = function(address) {
|
$scope.getKeyId = function(address) {
|
||||||
if ($location.search().dev || !address) {
|
if ($location.search().dev || !address) {
|
||||||
return;
|
return;
|
||||||
|
@ -92,18 +92,7 @@ ngModule.directive('frameLoad', function($window) {
|
|||||||
function displayContent() {
|
function displayContent() {
|
||||||
var mail = scope.state.mailList.selected;
|
var mail = scope.state.mailList.selected;
|
||||||
|
|
||||||
if (!mail) {
|
if (!mail || (mail.encrypted && !mail.decrypted)) {
|
||||||
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();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return;
|
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() {
|
describe('getKeyId', function() {
|
||||||
var address = 'asfd@asdf.com';
|
var address = 'asfd@asdf.com';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user