File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
android/src/main/java/com/tailscale/ipn/ui Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,15 @@ class Tailcfg {
188188 data class Service (var Proto : String , var Port : Int , var Description : String? = null )
189189
190190 @Serializable
191- data class NetworkProfile (var MagicDNSName : String? = null , var DomainName : String? = null )
191+ data class NetworkProfile (
192+ var MagicDNSName : String? = null ,
193+ var DomainName : String? = null ,
194+ var DisplayName : String? = null
195+ ) {
196+ fun tailnetNameForDisplay (): String? {
197+ return DisplayName ? : DomainName
198+ }
199+ }
192200
193201 @Serializable
194202 data class Location (
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ fun MainView(
167167 }
168168 },
169169 headlineContent = {
170- user?.NetworkProfile ?.DomainName ?.let { domain ->
170+ user?.NetworkProfile ?.tailnetNameForDisplay() ?.let { domain ->
171171 AutoResizingText (
172172 text = domain,
173173 style = MaterialTheme .typography.titleMedium.short,
@@ -500,7 +500,7 @@ fun ConnectView(
500500 fontWeight = FontWeight .SemiBold ,
501501 textAlign = TextAlign .Center ,
502502 fontFamily = MaterialTheme .typography.titleMedium.fontFamily)
503- val tailnetName = user.NetworkProfile ?.DomainName ? : " "
503+ val tailnetName = user.NetworkProfile ?.tailnetNameForDisplay() ? : " "
504504 Text (
505505 buildAnnotatedString {
506506 append(stringResource(id = R .string.connect_to_tailnet_prefix))
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ fun UserView(
6363 supportingContent = {
6464 Column {
6565 AutoResizingText (
66- text = profile.NetworkProfile ?.DomainName ? : " " ,
66+ text = profile.NetworkProfile ?.tailnetNameForDisplay() ? : " " ,
6767 style = MaterialTheme .typography.bodyMedium.short,
6868 minFontSize = MaterialTheme .typography.minTextSize,
6969 overflow = TextOverflow .Ellipsis )
You can’t perform that action at this time.
0 commit comments