Always touch the thread when updating a message.

This commit is contained in:
Matthew Chen 2018-07-20 16:54:00 -04:00 committed by Michael Kirk
parent d793c008b5
commit f0d797a91f
2 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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);