fix: Pass isDarkTheme parameter to MainScreen and ChatDetailScreen for consistent theming
This commit is contained in:
@@ -716,7 +716,8 @@ fun MainScreen(
|
|||||||
onNavigateToChat = { forwardUser ->
|
onNavigateToChat = { forwardUser ->
|
||||||
// 📨 Forward: переход в выбранный чат с полными данными
|
// 📨 Forward: переход в выбранный чат с полными данными
|
||||||
selectedUser = forwardUser
|
selectedUser = forwardUser
|
||||||
}
|
},
|
||||||
|
isDarkTheme = isDarkTheme
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ fun ChatDetailScreen(
|
|||||||
onUserProfileClick: (SearchUser) -> Unit = {},
|
onUserProfileClick: (SearchUser) -> Unit = {},
|
||||||
currentUserPublicKey: String,
|
currentUserPublicKey: String,
|
||||||
currentUserPrivateKey: String,
|
currentUserPrivateKey: String,
|
||||||
totalUnreadFromOthers: Int = 0
|
totalUnreadFromOthers: Int = 0,
|
||||||
|
isDarkTheme: Boolean
|
||||||
) {
|
) {
|
||||||
val viewModel: ChatViewModel = viewModel(key = "chat_${user.publicKey}")
|
val viewModel: ChatViewModel = viewModel(key = "chat_${user.publicKey}")
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
@@ -100,7 +101,6 @@ fun ChatDetailScreen(
|
|||||||
val database = RosettaDatabase.getDatabase(context)
|
val database = RosettaDatabase.getDatabase(context)
|
||||||
|
|
||||||
// UI Theme
|
// UI Theme
|
||||||
val isDarkTheme = androidx.compose.foundation.isSystemInDarkTheme()
|
|
||||||
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
val backgroundColor = if (isDarkTheme) Color(0xFF1A1A1A) else Color(0xFFF2F2F7)
|
||||||
val textColor = if (isDarkTheme) Color.White else Color.Black
|
val textColor = if (isDarkTheme) Color.White else Color.Black
|
||||||
val secondaryTextColor = if (isDarkTheme) Color(0xFF8E8E93) else Color(0xFF8E8E93)
|
val secondaryTextColor = if (isDarkTheme) Color(0xFF8E8E93) else Color(0xFF8E8E93)
|
||||||
|
|||||||
Reference in New Issue
Block a user