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)) Spacer(modifier = Modifier.weight(1f))
// Info // Info - hide when keyboard is visible
AnimatedVisibility( AnimatedVisibility(
visible = visible, visible = visible && !isKeyboardVisible,
enter = fadeIn(tween(500, delayMillis = 500)) 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( Row(
modifier = Modifier modifier = Modifier
@@ -469,12 +482,13 @@ fun SetPasswordScreen(
seedPhrase.joinToString(" "), password 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( val account = EncryptedAccount(
publicKey = keyPair.publicKey, publicKey = keyPair.publicKey,
encryptedPrivateKey = encryptedPrivateKey, encryptedPrivateKey = encryptedPrivateKey,
encryptedSeedPhrase = encryptedSeedPhrase, encryptedSeedPhrase = encryptedSeedPhrase,
name = "Account 1" name = truncatedKey
) )
accountManager.saveAccount(account) accountManager.saveAccount(account)

View File

@@ -338,8 +338,11 @@ fun ChatsListScreen(
drawerState = drawerState, drawerState = drawerState,
drawerContent = { drawerContent = {
ModalDrawerSheet( ModalDrawerSheet(
modifier = Modifier.width(300.dp), modifier = Modifier
drawerContainerColor = drawerBackgroundColor .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 // Header with logo and theme toggle
Box( 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))
} }
} }
) { ) {