diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewModel.m b/Signal/src/ViewControllers/ConversationView/ConversationViewModel.m index 574504950..2327d4a6a 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewModel.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewModel.m @@ -1352,7 +1352,7 @@ static const int kYapDatabaseRangeMinLength = 0; OWSAssertDebug([notification.object isKindOfClass:[NSString class]]); OWSAssertDebug(self.thread); - if (![notification.object isEqual:self.thread.uniqueId]) { + if (notification.object && ![notification.object isEqual:self.thread.uniqueId]) { return; } diff --git a/Signal/src/ViewControllers/HomeView/HomeViewCell.m b/Signal/src/ViewControllers/HomeView/HomeViewCell.m index 2658d5d10..63e838c81 100644 --- a/Signal/src/ViewControllers/HomeView/HomeViewCell.m +++ b/Signal/src/ViewControllers/HomeView/HomeViewCell.m @@ -548,7 +548,7 @@ NS_ASSUME_NONNULL_BEGIN OWSAssertDebug([notification.object isKindOfClass:[NSString class]]); OWSAssertDebug(self.thread); - if (![notification.object isEqual:self.thread.threadRecord.uniqueId]) { + if (notification.object && ![notification.object isEqual:self.thread.threadRecord.uniqueId]) { return; } diff --git a/SignalServiceKit/src/Util/TypingIndicators.swift b/SignalServiceKit/src/Util/TypingIndicators.swift index be57a61e3..97b721391 100644 --- a/SignalServiceKit/src/Util/TypingIndicators.swift +++ b/SignalServiceKit/src/Util/TypingIndicators.swift @@ -88,6 +88,8 @@ public class TypingIndicatorsImpl: NSObject, TypingIndicators { primaryStorage.dbReadWriteConnection.setBool(value, forKey: kDatabaseKey_TypingIndicatorsEnabled, inCollection: kDatabaseCollection) syncManager.sendConfigurationSyncMessage() + + NotificationCenter.default.postNotificationNameAsync(TypingIndicatorsImpl.typingIndicatorStateDidChange, object: nil) } @objc @@ -132,6 +134,7 @@ public class TypingIndicatorsImpl: NSObject, TypingIndicators { @objc public func didReceiveTypingStartedMessage(inThread thread: TSThread, recipientId: String, deviceId: UInt) { AssertIsOnMainThread() + Logger.info("") let incomingIndicators = ensureIncomingIndicators(forThread: thread, recipientId: recipientId, deviceId: deviceId) incomingIndicators.didReceiveTypingStartedMessage() } @@ -139,6 +142,7 @@ public class TypingIndicatorsImpl: NSObject, TypingIndicators { @objc public func didReceiveTypingStoppedMessage(inThread thread: TSThread, recipientId: String, deviceId: UInt) { AssertIsOnMainThread() + Logger.info("") let incomingIndicators = ensureIncomingIndicators(forThread: thread, recipientId: recipientId, deviceId: deviceId) incomingIndicators.didReceiveTypingStoppedMessage() } @@ -146,6 +150,7 @@ public class TypingIndicatorsImpl: NSObject, TypingIndicators { @objc public func didReceiveIncomingMessage(inThread thread: TSThread, recipientId: String, deviceId: UInt) { AssertIsOnMainThread() + Logger.info("") let incomingIndicators = ensureIncomingIndicators(forThread: thread, recipientId: recipientId, deviceId: deviceId) incomingIndicators.didReceiveIncomingMessage() }