From d12e92c9e525165862475f2ef4fc6550b6da93fd Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Mon, 22 Jun 2020 08:56:19 +1000 Subject: [PATCH] Style all mentions the same --- Signal/src/Loki/Utilities/MentionUtilities.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Signal/src/Loki/Utilities/MentionUtilities.swift b/Signal/src/Loki/Utilities/MentionUtilities.swift index b71aac2b5..c6f564a67 100644 --- a/Signal/src/Loki/Utilities/MentionUtilities.swift +++ b/Signal/src/Loki/Utilities/MentionUtilities.swift @@ -11,10 +11,8 @@ public final class MentionUtilities : NSObject { @objc public static func highlightMentions(in string: String, isOutgoingMessage: Bool, threadID: String, attributes: [NSAttributedString.Key:Any]) -> NSAttributedString { let userHexEncodedPublicKey = getUserHexEncodedPublicKey() var publicChat: LokiPublicChat? - var userLinkedDeviceHexEncodedPublicKeys: Set! OWSPrimaryStorage.shared().dbReadConnection.read { transaction in publicChat = LokiDatabaseUtilities.getPublicChat(for: threadID, in: transaction) - userLinkedDeviceHexEncodedPublicKeys = LokiDatabaseUtilities.getLinkedDeviceHexEncodedPublicKeys(for: userHexEncodedPublicKey, in: transaction) } var string = string let regex = try! NSRegularExpression(pattern: "@[0-9a-fA-F]*", options: []) @@ -49,7 +47,6 @@ public final class MentionUtilities : NSObject { } let result = NSMutableAttributedString(string: string, attributes: attributes) mentions.forEach { mention in - guard userLinkedDeviceHexEncodedPublicKeys.contains(mention.hexEncodedPublicKey) else { return } result.addAttribute(.foregroundColor, value: Colors.accent, range: mention.range) result.addAttribute(.font, value: UIFont.boldSystemFont(ofSize: Values.mediumFontSize), range: mention.range) }