Repair corrupt thread view.

pull/1/head
Matthew Chen 7 years ago
parent a0a48431ca
commit 20de087441

@ -880,6 +880,13 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
withMappings:self.threadMappings]; withMappings:self.threadMappings];
}]; }];
static BOOL hasIncrementedDatabaseView = NO;
if (![thread isKindOfClass:[TSThread class]] && !hasIncrementedDatabaseView) {
OWSLogError(@"Invalid object in thread view: %@", [thread class]);
[OWSStorage incrementVersionOfDatabaseExtension:TSThreadDatabaseViewExtensionName];
hasIncrementedDatabaseView = YES;
}
return thread; return thread;
} }

Loading…
Cancel
Save