Fixed an unrecognised selector crash hidden by the conversion of Objective-C to Swift

This commit is contained in:
Morgan Pretty 2022-03-04 17:17:58 +11:00
parent f316eb4e24
commit decb946bf3
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) NSString *authorId;
// convenience method for expiring a message which was just read
- (void)markAsReadNowWithSendReadReceipt:(BOOL)sendReadReceipt
- (void)markAsReadNowWithTrySendReadReceipt:(BOOL)trySendReadReceipt
transaction:(YapDatabaseReadWriteTransaction *)transaction;
- (void)setNotificationIdentifier:(NSString * _Nullable)notificationIdentifier

View File

@ -296,7 +296,7 @@ extension MessageReceiver {
}
if let messageToDelete = localMessage {
if let incomingMessage = messageToDelete as? TSIncomingMessage {
incomingMessage.markAsReadNow(withSendReadReceipt: false, transaction: transaction)
incomingMessage.markAsReadNow(withTrySendReadReceipt: false, transaction: transaction)
if let notificationIdentifier = incomingMessage.notificationIdentifier, !notificationIdentifier.isEmpty {
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [notificationIdentifier])
UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: [notificationIdentifier])