migration: mark parts with content-id and inline as HIDDEN_ATTACHMENT
This commit is contained in:
parent
a101a15353
commit
a2012a1a38
1 changed files with 4 additions and 1 deletions
|
@ -684,8 +684,11 @@ class StoreSchemaDefinition implements LockableDatabase.SchemaDefinition {
|
|||
Log.d(K9.LOG_TAG, "attachment is in local cache");
|
||||
}
|
||||
|
||||
boolean hasContentTypeAndIsInline = !TextUtils.isEmpty(contentId) && "inline".equalsIgnoreCase(contentDisposition);
|
||||
int messageType = hasContentTypeAndIsInline ? MessagePartType.HIDDEN_ATTACHMENT : MessagePartType.UNKNOWN;
|
||||
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put("type", MessagePartType.UNKNOWN);
|
||||
cv.put("type", messageType);
|
||||
cv.put("mime_type", mimeType);
|
||||
cv.put("decoded_body_size", size);
|
||||
cv.put("display_name", name);
|
||||
|
|
Loading…
Reference in a new issue