feat: Enhance SetPasswordScreen to hide info when keyboard is visible with animated transitions
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user