Make purple color more consistent in mentions
Changelog-Fixed: Make damus purple use more consistent in mentions Closes: #709
This commit is contained in:
committed by
William Casarin
parent
241ed1041d
commit
5423704980
@@ -142,14 +142,14 @@ struct NoteContentView: View {
|
||||
func hashtag_str(_ htag: String) -> AttributedString {
|
||||
var attributedString = AttributedString(stringLiteral: "#\(htag)")
|
||||
attributedString.link = URL(string: "nostr:t:\(htag)")
|
||||
attributedString.foregroundColor = .purple
|
||||
attributedString.foregroundColor = Color("DamusPurple")
|
||||
return attributedString
|
||||
}
|
||||
|
||||
func url_str(_ url: URL) -> AttributedString {
|
||||
var attributedString = AttributedString(stringLiteral: url.absoluteString)
|
||||
attributedString.link = url
|
||||
attributedString.foregroundColor = .purple
|
||||
attributedString.foregroundColor = Color("DamusPurple")
|
||||
return attributedString
|
||||
}
|
||||
|
||||
@@ -161,13 +161,13 @@ func mention_str(_ m: Mention, profiles: Profiles) -> AttributedString {
|
||||
let disp = Profile.displayName(profile: profile, pubkey: pk)
|
||||
var attributedString = AttributedString(stringLiteral: "@\(disp)")
|
||||
attributedString.link = URL(string: "nostr:\(encode_pubkey_uri(m.ref))")
|
||||
attributedString.foregroundColor = .purple
|
||||
attributedString.foregroundColor = Color("DamusPurple")
|
||||
return attributedString
|
||||
case .event:
|
||||
let bevid = bech32_note_id(m.ref.ref_id) ?? m.ref.ref_id
|
||||
var attributedString = AttributedString(stringLiteral: "@\(abbrev_pubkey(bevid))")
|
||||
attributedString.link = URL(string: "nostr:\(encode_event_id_uri(m.ref))")
|
||||
attributedString.foregroundColor = .purple
|
||||
attributedString.foregroundColor = Color("DamusPurple")
|
||||
return attributedString
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user