Always touch the thread when updating a message.

pull/1/head
Matthew Chen 7 years ago committed by Michael Kirk
parent d793c008b5
commit f0d797a91f

@ -348,6 +348,15 @@ static const NSUInteger OWSMessageSchemaVersion = 4;
#pragma mark - Update With... Methods
- (void)applyChangeToSelfAndLatestCopy:(YapDatabaseReadWriteTransaction *)transaction
changeBlock:(void (^)(id))changeBlock
{
OWSAssert(transaction);
[super applyChangeToSelfAndLatestCopy:transaction changeBlock:changeBlock];
[self touchThreadWithTransaction:transaction];
}
- (void)updateWithExpireStartedAt:(uint64_t)expireStartedAt transaction:(YapDatabaseReadWriteTransaction *)transaction
{
OWSAssert(expireStartedAt > 0);

@ -524,15 +524,6 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt
#pragma mark - Update With... Methods
- (void)applyChangeToSelfAndLatestCopy:(YapDatabaseReadWriteTransaction *)transaction
changeBlock:(void (^)(id))changeBlock
{
OWSAssert(transaction);
[super applyChangeToSelfAndLatestCopy:transaction changeBlock:changeBlock];
[self touchThreadWithTransaction:transaction];
}
- (void)updateWithSendingError:(NSError *)error
{
OWSAssert(error);

Loading…
Cancel
Save