Skip to content

Commit

Permalink
improve display names for protected services. add address and port to…
Browse files Browse the repository at this point in the history
… access them
  • Loading branch information
imdawon committed May 25, 2024
1 parent 3ea2d5b commit 72f8b6d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ fun DrawbridgeApp(connectToDrawbridge: (Context, String) -> Unit, options: List<

LazyColumn {
items(options) { option ->
val displayName = option.substring(3).trim()
val displayNameWithoutCommandSubstring = option.substringAfter("PS_LIST: ")
val portOffset = displayNameWithoutCommandSubstring.substring(0, 3).toInt()
val port = 10000 + portOffset
val displayName = displayNameWithoutCommandSubstring.substring(3).trim() + " @ localhost:${port}"
Text(text = displayName, modifier = Modifier.padding(vertical = 4.dp))
}
}
Expand Down

0 comments on commit 72f8b6d

Please sign in to comment.