Don't generate thumbnail until attachment has been saved

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent dce6c376cd
commit 9c57a1f7e1

@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_BEGIN
_creationTimestamp = [NSDate new];
[self ensureFilePath];
[self ensureThumbnail];
return self;
}
@ -72,7 +71,6 @@ NS_ASSUME_NONNULL_BEGIN
_creationTimestamp = [NSDate new];
[self ensureFilePath];
[self ensureThumbnail];
return self;
}
@ -98,6 +96,12 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (void)saveWithTransaction:(YapDatabaseReadWriteTransaction *)transaction
{
[super saveWithTransaction:transaction];
[self ensureThumbnail];
}
- (void)upgradeFromAttachmentSchemaVersion:(NSUInteger)attachmentSchemaVersion
{
[super upgradeFromAttachmentSchemaVersion:attachmentSchemaVersion];

Loading…
Cancel
Save