Skip to content

Commit 08a062b

Browse files
authored
android: show hex code for TV log in (#557)
Remove flag gating the display of a hex code for Android TV users, now that the change allowing hex code input in the admin console is merged. Fixes tailscale/tailscale#13277 Signed-off-by: kari-ts <[email protected]>
1 parent 4c4148b commit 08a062b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

android/src/main/java/com/tailscale/ipn/ui/viewModel/LoginQRViewModel.kt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,22 @@ class LoginQRViewModel : IpnViewModel() {
2323
val numCode: StateFlow<String?> = MutableStateFlow(null)
2424
val qrCode: StateFlow<ImageBitmap?> = MutableStateFlow(null)
2525
// Remove this once changes to admin console allowing input code to be entered are made.
26-
val codeEnabled = false
2726

2827
init {
2928
viewModelScope.launch {
3029
Notifier.browseToURL.collect { url ->
3130
url?.let {
3231
qrCode.set(generateQRCode(url, 200, 0))
3332

34-
if (codeEnabled) {
35-
// Extract the string after "https://login.tailscale.com/a/"
36-
val prefix = "https://login.tailscale.com/a/"
37-
val code =
38-
if (it.startsWith(prefix)) {
39-
it.removePrefix(prefix)
40-
} else {
41-
null
42-
}
43-
numCode.set(code)
44-
}
33+
// Extract the string after "https://login.tailscale.com/a/"
34+
val prefix = "https://login.tailscale.com/a/"
35+
val code =
36+
if (it.startsWith(prefix)) {
37+
it.removePrefix(prefix)
38+
} else {
39+
null
40+
}
41+
numCode.set(code)
4542
}
4643
?: run {
4744
qrCode.set(null)

0 commit comments

Comments
 (0)