damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 2e640db0129f07d24e409edc00873cf2c96eb845
parent eed16449fe9abaf9873f1589913bce7d7bb38a31
Author: William Casarin <jb55@jb55.com>
Date:   Thu,  6 Apr 2023 12:10:39 -0700

Make bitcoin hashtag orange

Diffstat:
Mdamus/Views/NoteContentView.swift | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git 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 {