Fix iframe resize issue on iOS

This commit is contained in:
Tankred Hase 2015-05-11 15:23:10 +02:00
parent b8f21ac7eb
commit 19bdf0aa49
3 changed files with 1 additions and 37 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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';