feat(PluginsScreen): adhere to no hyperlink plugin manifest property

This commit is contained in:
rushiiMachine 2025-01-24 10:28:44 -08:00
parent 05cd6daf43
commit 1921237230
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420
2 changed files with 7 additions and 3 deletions

View file

@ -24,5 +24,9 @@ data class Manifest(
.replaceFirst("/builds.*".toRegex(), "")
@Serializable
data class Author(val name: String, val id: Long)
data class Author(
val name: String,
val id: Long,
val hyperlink: Boolean = true,
)
}

View file

@ -67,7 +67,7 @@ fun PluginCard(
for ((idx, author) in plugin.manifest.authors.withIndex()) {
if (idx > 0) append(", ")
pushLink(
if (author.hyperlink) pushLink(
LinkAnnotation.Url(
url = "https://discord.com/users/${author.id}",
styles = TextLinkStyles(
@ -78,7 +78,7 @@ fun PluginCard(
)
)
append(author.name)
pop()
if (author.hyperlink) pop()
}
}
}