mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Include database ID in message parts reconstructed from the database
This commit is contained in:
parent
8fce9e3654
commit
41bd420213
@ -0,0 +1,27 @@
|
|||||||
|
package com.fsck.k9.mailstore;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fsck.k9.mail.MessagingException;
|
||||||
|
import com.fsck.k9.mail.internet.MimeBodyPart;
|
||||||
|
|
||||||
|
|
||||||
|
public class LocalBodyPart extends MimeBodyPart implements LocalPart {
|
||||||
|
private final String accountUuid;
|
||||||
|
private final long messagePartId;
|
||||||
|
|
||||||
|
public LocalBodyPart(String accountUuid, long messagePartId) throws MessagingException {
|
||||||
|
super();
|
||||||
|
this.accountUuid = accountUuid;
|
||||||
|
this.messagePartId = messagePartId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAccountUuid() {
|
||||||
|
return accountUuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getId() {
|
||||||
|
return messagePartId;
|
||||||
|
}
|
||||||
|
}
|
@ -686,7 +686,7 @@ public class LocalFolder extends Folder<LocalMessage> implements Serializable {
|
|||||||
|
|
||||||
String parentMimeType = parentPart.getMimeType();
|
String parentMimeType = parentPart.getMimeType();
|
||||||
if (parentMimeType.startsWith("multipart/")) {
|
if (parentMimeType.startsWith("multipart/")) {
|
||||||
BodyPart bodyPart = new MimeBodyPart();
|
BodyPart bodyPart = new LocalBodyPart(getAccountUuid(), id);
|
||||||
((Multipart) parentPart.getBody()).addBodyPart(bodyPart);
|
((Multipart) parentPart.getBody()).addBodyPart(bodyPart);
|
||||||
part = bodyPart;
|
part = bodyPart;
|
||||||
} else if (parentMimeType.startsWith("message/")) {
|
} else if (parentMimeType.startsWith("message/")) {
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.fsck.k9.mailstore;
|
||||||
|
|
||||||
|
|
||||||
|
public interface LocalPart {
|
||||||
|
String getAccountUuid();
|
||||||
|
long getId();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user