From af7dd3e82f6d168321337e933a1fadb04cac0999 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Wed, 19 Jan 2022 10:59:49 +1100 Subject: [PATCH] highlight `Note to Self` --- Session/Shared/ConversationCell.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Session/Shared/ConversationCell.swift b/Session/Shared/ConversationCell.swift index 93b90d798..9cc810c7a 100644 --- a/Session/Shared/ConversationCell.swift +++ b/Session/Shared/ConversationCell.swift @@ -226,6 +226,10 @@ final class ConversationCell : UITableViewCell { } private func getHighlightedSnippet(snippet: String, searchText: String) -> NSMutableAttributedString { + guard snippet != NSLocalizedString("NOTE_TO_SELF", comment: "") else { + return NSMutableAttributedString(string: snippet, attributes: [.foregroundColor:Colors.text]) + } + let result = NSMutableAttributedString(string: snippet, attributes: [.foregroundColor:UIColor.gray]) let normalizedSnippet = snippet.lowercased() as NSString let normalizedSearchText = searchText.lowercased()