Hide the default port in bookmark lists
Bookmark.hostPort gives the address alone for port 9987 and address:port otherwise. The Android connect screen, the myTeamSpeak item lists on desktop and Android, and the display name of an unnamed bookmark use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -221,7 +221,7 @@ private fun BookmarkRow(
|
||||
})
|
||||
},
|
||||
supportingContent = {
|
||||
Text(listOfNotNull("${bookmark.address}:${bookmark.port}", bookmark.channel.ifBlank { null }, identity?.name)
|
||||
Text(listOfNotNull(bookmark.hostPort(), bookmark.channel.ifBlank { null }, identity?.name)
|
||||
.joinToString(" · "))
|
||||
},
|
||||
leadingContent = { BookmarkIcon(bookmark.iconId) },
|
||||
|
||||
@@ -43,6 +43,7 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.lixko.ts3j.client.android.SessionController
|
||||
import eu.lixko.ts3j.client.config.Bookmark
|
||||
import eu.lixko.ts3j.client.myts.AccountInfo
|
||||
import eu.lixko.ts3j.client.myts.MyTeamSpeak
|
||||
import eu.lixko.ts3j.client.myts.MyTsException
|
||||
@@ -256,7 +257,7 @@ private fun name(item: SyncItem) = when (item) {
|
||||
}
|
||||
|
||||
private fun details(item: SyncItem) = when (item) {
|
||||
is SyncItem.Bookmark -> "${item.address()}:${item.port()}"
|
||||
is SyncItem.Bookmark -> Bookmark.hostPort(item.address(), item.port())
|
||||
is SyncItem.Identity -> item.nickname()
|
||||
else -> ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user