diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt index a2e5eec8df47..22dfc34269d1 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AccountScreen.kt @@ -157,23 +157,23 @@ fun AccountScreen( ) Spacer(modifier = Modifier.weight(1f)) - if (IS_PLAY_BUILD.not()) { - ActionButton( - text = stringResource(id = R.string.manage_account), - onClick = onManageAccountClick, - modifier = - Modifier.padding( - start = Dimens.sideMargin, - end = Dimens.sideMargin, - bottom = Dimens.screenVerticalMargin - ), - colors = - ButtonDefaults.buttonColors( - contentColor = MaterialTheme.colorScheme.onPrimary, - containerColor = MaterialTheme.colorScheme.surface - ) - ) - } + if (IS_PLAY_BUILD.not()) { + ActionButton( + text = stringResource(id = R.string.manage_account), + onClick = onManageAccountClick, + modifier = + Modifier.padding( + start = Dimens.sideMargin, + end = Dimens.sideMargin, + bottom = Dimens.screenVerticalMargin + ), + colors = + ButtonDefaults.buttonColors( + contentColor = MaterialTheme.colorScheme.onPrimary, + containerColor = MaterialTheme.colorScheme.surface + ) + ) + } ActionButton( text = stringResource(id = R.string.redeem_voucher), diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt index b1a25fb581dc..6a2eaf58119d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/LoginScreen.kt @@ -156,7 +156,13 @@ private fun LoginContent( ) ExposedDropdownMenuBox(expanded = expanded, onExpandedChange = { expanded = it }) { TextField( - modifier = Modifier.menuAnchor().fillMaxWidth(), + modifier = + Modifier.then( + // Using menuAnchor while not showing a dropdown will cause keyboard to + // open and app to crash on navigation + if (state.lastUsedAccount != null) Modifier.menuAnchor() else Modifier + ) + .fillMaxWidth(), value = state.accountNumberInput, label = { Text( diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/util/AccountTokenVisualTransformation.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/util/AccountTokenVisualTransformation.kt index f7efcffb5773..3160ff9ac126 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/util/AccountTokenVisualTransformation.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/util/AccountTokenVisualTransformation.kt @@ -21,7 +21,6 @@ fun accountTokenVisualTransformation() = VisualTransformation { override fun transformedToOriginal(offset: Int): Int = offset - (offset - 1) / (ACCOUNT_TOKEN_CHUNK_SIZE + 1) - } ) }