feat: Add screen orientation setting and improve padding for navigation bars in ChatsList and Onboarding screens

This commit is contained in:
2026-01-18 19:52:56 +05:00
parent fcc7755fb5
commit aac5081dec
11 changed files with 49 additions and 9 deletions

View File

@@ -133,6 +133,7 @@ fun ConfirmSeedPhraseScreen(
.fillMaxSize()
.background(backgroundColor)
.statusBarsPadding()
.navigationBarsPadding()
) {
Column(modifier = Modifier.fillMaxSize()) {
// Top bar

View File

@@ -53,6 +53,7 @@ fun ImportSeedPhraseScreen(
.fillMaxSize()
.background(backgroundColor)
.statusBarsPadding()
.navigationBarsPadding()
) {
Column(modifier = Modifier.fillMaxSize()) {
// Top bar

View File

@@ -56,6 +56,7 @@ fun SeedPhraseScreen(
.fillMaxSize()
.background(backgroundColor)
.statusBarsPadding()
.navigationBarsPadding()
) {
Column(modifier = Modifier.fillMaxSize()) {
// Simple top bar

View File

@@ -97,7 +97,7 @@ fun SetPasswordScreen(
val isPasswordWeak = password.isNotEmpty() && password.length < 6
val canContinue = passwordsMatch && !isCreating
Box(modifier = Modifier.fillMaxSize().background(backgroundColor)) {
Box(modifier = Modifier.fillMaxSize().background(backgroundColor).navigationBarsPadding()) {
Column(modifier = Modifier.fillMaxSize().statusBarsPadding()) {
// Top Bar
Row(

View File

@@ -167,7 +167,7 @@ fun UnlockScreen(
}
}
Box(modifier = Modifier.fillMaxSize().background(backgroundColor)) {
Box(modifier = Modifier.fillMaxSize().background(backgroundColor).navigationBarsPadding()) {
Column(
modifier =
Modifier.fillMaxSize()

View File

@@ -76,7 +76,7 @@ fun WelcomeScreen(
var visible by remember { mutableStateOf(false) }
LaunchedEffect(Unit) { visible = true }
Box(modifier = Modifier.fillMaxSize().background(backgroundColor)) {
Box(modifier = Modifier.fillMaxSize().background(backgroundColor).navigationBarsPadding()) {
// Back button when coming from UnlockScreen
if (hasExistingAccount) {
IconButton(onClick = onBack, modifier = Modifier.statusBarsPadding().padding(4.dp)) {

View File

@@ -151,8 +151,15 @@ fun ChatsListScreen(
LaunchedEffect(Unit) { hasInitialized = true }
val view = androidx.compose.ui.platform.LocalView.current
val context = androidx.compose.ui.platform.LocalContext.current
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
// 🔥 ВСЕГДА закрываем клавиатуру при появлении ChatsListScreen
LaunchedEffect(Unit) {
val imm = context.getSystemService(android.content.Context.INPUT_METHOD_SERVICE) as android.view.inputmethod.InputMethodManager
imm.hideSoftInputFromWindow(view.windowToken, 0)
}
// Update status bar and completely hide navigation bar
LaunchedEffect(isDarkTheme) {
@@ -199,11 +206,10 @@ fun ChatsListScreen(
var showStatusDialog by remember { mutableStateOf(false) }
val debugLogs by ProtocolManager.debugLogs.collectAsState()
// <EFBFBD> FCM токен диалог
// 📱 FCM токен диалог
var showFcmDialog by remember { mutableStateOf(false) }
val context = LocalContext.current
// <EFBFBD>📬 Requests screen state
// 📬 Requests screen state
var showRequestsScreen by remember { mutableStateOf(false) }
// 🔥 Используем rememberSaveable чтобы сохранить состояние при навигации
@@ -410,7 +416,7 @@ fun ChatsListScreen(
}
// Simple background
Box(modifier = Modifier.fillMaxSize().background(backgroundColor)) {
Box(modifier = Modifier.fillMaxSize().background(backgroundColor).navigationBarsPadding()) {
ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {

View File

@@ -179,6 +179,7 @@ fun OnboardingScreen(
Box(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding()
) {
// Base background - shows the OLD theme color during transition
Box(