Fix "can't send same GIF twice" issue.
// FREEBIE
This commit is contained in:
parent
9eb4909185
commit
4dabb71815
@ -3242,9 +3242,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
||||
OWSAssert([NSThread isMainThread]);
|
||||
OWSAssert(message);
|
||||
|
||||
[self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[message saveWithTransaction:transaction];
|
||||
}];
|
||||
[self updateLastVisibleTimestamp:message.timestampForSorting];
|
||||
self.lastMessageSentDate = [NSDate new];
|
||||
[self clearUnreadMessagesIndicator];
|
||||
|
||||
@ -300,6 +300,20 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return instance;
|
||||
}
|
||||
|
||||
- (void)setFilePath:(NSString *)filePath
|
||||
{
|
||||
OWSAssert(filePath.length > 0);
|
||||
|
||||
#ifdef DEBUG
|
||||
BOOL isDirectory;
|
||||
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
|
||||
OWSAssert(exists);
|
||||
OWSAssert(!isDirectory);
|
||||
#endif
|
||||
|
||||
_filePath = filePath;
|
||||
}
|
||||
|
||||
- (NSData *)data
|
||||
{
|
||||
OWSAssert(self.filePath);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user