Skip to content

Commit 18e4b17

Browse files
authored
android: fix missing '}' issue (#487)
also run linter Updates #cleanup Signed-off-by: kari-ts <[email protected]>
1 parent 77eaadb commit 18e4b17

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

android/src/main/java/com/tailscale/ipn/ui/view/TailnetLockSetupView.kt

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -87,48 +87,46 @@ fun TailnetLockSetupView(
8787
subtitle = stringResource(R.string.tailnet_lock_key_explainer))
8888
}
8989
}
90+
}
9091
}
9192

9293
@Composable
9394
private fun ExplainerView() {
94-
val handler = LocalUriHandler.current
95+
val handler = LocalUriHandler.current
9596

96-
Lists.MultilineDescription {
97-
ClickableText(
98-
explainerText(),
99-
onClick = { handler.openUri(Links.TAILNET_LOCK_KB_URL) },
100-
style = MaterialTheme.typography.bodyMedium
101-
)
102-
}
97+
Lists.MultilineDescription {
98+
ClickableText(
99+
explainerText(),
100+
onClick = { handler.openUri(Links.TAILNET_LOCK_KB_URL) },
101+
style = MaterialTheme.typography.bodyMedium)
102+
}
103103
}
104104

105105
@Composable
106106
fun explainerText(): AnnotatedString {
107-
val annotatedString = buildAnnotatedString {
108-
withStyle(SpanStyle(color = MaterialTheme.colorScheme.defaultTextColor)) {
109-
append(stringResource(id = R.string.tailnet_lock_explainer))
110-
}
107+
return buildAnnotatedString {
108+
withStyle(SpanStyle(color = MaterialTheme.colorScheme.defaultTextColor)) {
109+
append(stringResource(id = R.string.tailnet_lock_explainer))
110+
}
111111

112-
pushStringAnnotation(tag = "tailnetLockSupportURL", annotation = Links.TAILNET_LOCK_KB_URL)
112+
pushStringAnnotation(tag = "tailnetLockSupportURL", annotation = Links.TAILNET_LOCK_KB_URL)
113113

114-
withStyle(
115-
style = SpanStyle(
114+
withStyle(
115+
style =
116+
SpanStyle(
116117
color = MaterialTheme.colorScheme.link,
117-
textDecoration = TextDecoration.Underline
118-
)
119-
) {
120-
append(stringResource(id = R.string.learn_more))
118+
textDecoration = TextDecoration.Underline)) {
119+
append(stringResource(id = R.string.learn_more))
121120
}
122-
pop()
123-
}
124-
return annotatedString
121+
pop()
122+
}
125123
}
126124

127125
@Composable
128126
@Preview
129127
fun TailnetLockSetupViewPreview() {
130-
val vm = TailnetLockSetupViewModel()
131-
vm.nodeKey.set("8BADF00D-EA7-1337-DEAD-BEEF")
132-
vm.tailnetLockKey.set("C0FFEE-CAFE-50DA")
133-
TailnetLockSetupView(backToSettings = {}, vm)
128+
val vm = TailnetLockSetupViewModel()
129+
vm.nodeKey.set("8BADF00D-EA7-1337-DEAD-BEEF")
130+
vm.tailnetLockKey.set("C0FFEE-CAFE-50DA")
131+
TailnetLockSetupView(backToSettings = {}, vm)
134132
}

0 commit comments

Comments
 (0)