trimming urls as well

pull/430/head v0.52.1
Vitor Pamplona 2023-05-27 16:16:52 -04:00
rodzic 1146b8ad54
commit 4517ca9fdd
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -540,11 +540,11 @@ private fun RelayBadges(baseNote: Note) {
fun RenderRelay(dirtyUrl: String) {
val uri = LocalUriHandler.current
val website = remember(dirtyUrl) {
val cleanUrl = dirtyUrl.removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
val cleanUrl = dirtyUrl.trim().removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
"https://$cleanUrl"
}
val iconUrl = remember(dirtyUrl) {
val cleanUrl = dirtyUrl.removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
val cleanUrl = dirtyUrl.trim().removePrefix("wss://").removePrefix("ws://").removeSuffix("/")
"https://$cleanUrl/favicon.ico"
}