Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ fun OpenProviderListButton(
val text = if (selectedLocation == null || selectedLocation.connectLocationId.bestAvailable) {
stringResource(id = R.string.best_available_provider)
} else {
selectedLocation.name
selectedLocation.name.truncateClientId()
}

val iconTint = if (selectedLocation == null || selectedLocation.connectLocationId.bestAvailable) {
Expand Down Expand Up @@ -449,6 +449,10 @@ fun OpenProviderListButton(
}
}

fun String.truncateClientId(): String {
return if (length > 12) "${take(4)}...${takeLast(4)}" else this
}

@Composable
fun WindowTypeButtonText(windowType: WindowType) {
val displayName = stringResource(
Expand Down