From 9f66b6d63c07da66dbe31d08f661910f035fcda0 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Thu, 14 Nov 2019 14:17:03 +1100 Subject: [PATCH] Hide read receipts for note to self --- .../ConversationView/Cells/OWSMessageFooterView.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m index 7c3317255..b06d4b9ca 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageFooterView.m @@ -146,7 +146,15 @@ NS_ASSUME_NONNULL_BEGIN break; } - if (statusIndicatorImage) { + __block BOOL isNoteToSelf = NO; + [OWSPrimaryStorage.sharedManager.dbReadConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) { + TSContactThread *thread = [outgoingMessage.thread as:TSContactThread.class]; + if (thread != nil) { + isNoteToSelf = [LKDatabaseUtilities isUserLinkedDevice:thread.contactIdentifier in:transaction]; + } + }]; + + if (statusIndicatorImage && !isNoteToSelf) { [self showStatusIndicatorWithIcon:statusIndicatorImage textColor:textColor]; } else { [self hideStatusIndicator];