replace corrected messages in decryption queue

This commit is contained in:
Daniel Gultsch 2016-06-15 14:29:25 +02:00
parent f99f21ab9b
commit 60588af825
2 changed files with 6 additions and 0 deletions

View file

@ -64,6 +64,11 @@ public class PgpDecryptionService {
this.pendingNotifications.removeAll(discards);
}
public synchronized void discard(Message message) {
this.messages.remove(message);
this.pendingNotifications.remove(message);
}
protected synchronized void decryptNext() {
if (pendingIntent == null
&& getOpenPgpApi() != null

View file

@ -483,6 +483,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
sendMessageReceipts(account, packet);
}
if (replacedMessage.getEncryption() == Message.ENCRYPTION_PGP) {
conversation.getAccount().getPgpDecryptionService().discard(replacedMessage);
conversation.getAccount().getPgpDecryptionService().decrypt(replacedMessage, false);
}
return;