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
|
// Author name and badges
|
||||||
authorInfo
|
authorInfo
|
||||||
|
|
||||||
// Comment content
|
// Comment content — render with clickable URLs and timestamps
|
||||||
Text(comment.content)
|
Text(DescriptionText.attributed(comment.content, linkColor: accentColor))
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundStyle(.primary)
|
.foregroundStyle(.primary)
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
.textSelection(.enabled)
|
.textSelection(.enabled)
|
||||||
|
.handleTimestampLinks(using: appEnvironment?.playerService)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Metadata row
|
// Metadata row
|
||||||
|
|||||||
Reference in New Issue
Block a user