feat: Enhance SetPasswordScreen to hide info when keyboard is visible with animated transitions

This commit is contained in:
k1ngsterr1
2026-01-09 03:10:04 +05:00
parent 961e89d8ee
commit 3cad4edd9b
2 changed files with 27 additions and 8 deletions

View File

@@ -409,10 +409,23 @@ fun SetPasswordScreen(
Spacer(modifier = Modifier.weight(1f))
// Info
// Info - hide when keyboard is visible
AnimatedVisibility(
visible = visible,
enter = fadeIn(tween(500, delayMillis = 500))
visible = visible && !isKeyboardVisible,
enter = fadeIn(tween(400)) + slideInVertically(
initialOffsetY = { 30 },
animationSpec = tween(400)
) + scaleIn(
initialScale = 0.9f,
animationSpec = tween(400)
),
exit = fadeOut(tween(300)) + slideOutVertically(
targetOffsetY = { 30 },
animationSpec = tween(300)
) + scaleOut(
targetScale = 0.9f,
animationSpec = tween(300)
)
) {
Row(
modifier = Modifier
@@ -469,12 +482,13 @@ fun SetPasswordScreen(
seedPhrase.joinToString(" "), password
)
// Save account
// Save account with truncated public key as name
val truncatedKey = "${keyPair.publicKey.take(6)}...${keyPair.publicKey.takeLast(4)}"
val account = EncryptedAccount(
publicKey = keyPair.publicKey,
encryptedPrivateKey = encryptedPrivateKey,
encryptedSeedPhrase = encryptedSeedPhrase,
name = "Account 1"
name = truncatedKey
)
accountManager.saveAccount(account)

View File

@@ -338,8 +338,11 @@ fun ChatsListScreen(
drawerState = drawerState,
drawerContent = {
ModalDrawerSheet(
modifier = Modifier.width(300.dp),
drawerContainerColor = drawerBackgroundColor
modifier = Modifier
.width(300.dp)
.fillMaxHeight(),
drawerContainerColor = drawerBackgroundColor,
windowInsets = WindowInsets(0, 0, 0, 0) // Remove all insets to cover entire screen
) {
// Header with logo and theme toggle
Box(
@@ -471,7 +474,9 @@ fun ChatsListScreen(
)
}
Spacer(modifier = Modifier.height(32.dp))
// Spacer to push content above navigation bar
Spacer(modifier = Modifier.navigationBarsPadding())
Spacer(modifier = Modifier.height(16.dp))
}
}
) {