From 2e640db0129f07d24e409edc00873cf2c96eb845 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 6 Apr 2023 12:10:39 -0700 Subject: [PATCH] Make bitcoin hashtag orange --- damus/Views/NoteContentView.swift | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift index f6ef906a..e75e6499 100644 --- a/damus/Views/NoteContentView.swift +++ b/damus/Views/NoteContentView.swift @@ -199,10 +199,16 @@ struct NoteContentView: View { } func hashtag_str(_ htag: String) -> AttributedString { - var attributedString = AttributedString(stringLiteral: "#\(htag)") - attributedString.link = URL(string: "damus:t:\(htag)") - attributedString.foregroundColor = DamusColors.purple - return attributedString + var attributedString = AttributedString(stringLiteral: "#\(htag)") + attributedString.link = URL(string: "damus:t:\(htag)") + + if htag.lowercased() == "bitcoin" { + attributedString.foregroundColor = Color.orange + } else { + attributedString.foregroundColor = DamusColors.purple + } + + return attributedString } func url_str(_ url: URL) -> AttributedString {