mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Render clickable links and timestamps in comment text
Comments now use DescriptionText.attributed so URLs become tappable and route through the same in-app pipeline as description links, and timestamp strings seek the player.
This commit is contained in:
@@ -43,13 +43,14 @@ struct CommentView: View {
|
||||
// Author name and badges
|
||||
authorInfo
|
||||
|
||||
// Comment content
|
||||
Text(comment.content)
|
||||
// Comment content — render with clickable URLs and timestamps
|
||||
Text(DescriptionText.attributed(comment.content, linkColor: accentColor))
|
||||
.font(.subheadline)
|
||||
.foregroundStyle(.primary)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
#if !os(tvOS)
|
||||
.textSelection(.enabled)
|
||||
.handleTimestampLinks(using: appEnvironment?.playerService)
|
||||
#endif
|
||||
|
||||
// Metadata row
|
||||
|
||||
Reference in New Issue
Block a user