Add legal docs, redesign profiles and chats tab, fix fullscreen images, add code style

Signed-off-by: denis0001-dev <denis0001.dev@ya.ru>
This commit is contained in:
2026-07-03 18:59:55 +03:00
Unverified
parent 306458bcd8
commit 7b82bc58f9
81 changed files with 8201 additions and 1590 deletions
@@ -55,7 +55,12 @@ import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.isImeVisible
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.window.DialogWindowProvider
import androidx.core.view.WindowCompat
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -120,17 +125,45 @@ actual fun Modifier.clearFocusOnKeyboardDismiss(): Modifier = composed {
@SuppressLint("ComposableNaming")
@Composable
actual fun ToggleNavScrimEffect(enabled: Boolean) {
val context = (LocalContext() as Activity)
LaunchedEffect(enabled) {
runCatching {
val window = context.window
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.isNavigationBarContrastEnforced = enabled
val context = LocalContext.current as Activity
DisposableEffect(enabled) {
val window = context.window
val previousContrastEnforced = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.isNavigationBarContrastEnforced
} else {
null
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.isNavigationBarContrastEnforced = enabled
}
onDispose {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && previousContrastEnforced != null) {
window.isNavigationBarContrastEnforced = previousContrastEnforced
}
}
}
}
@Composable
actual fun DialogEdgeToEdgeEffect() {
val view = LocalView.current
SideEffect {
val window = (view.parent as? DialogWindowProvider)?.window ?: return@SideEffect
runCatching {
WindowCompat.setDecorFitsSystemWindows(window, false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.isNavigationBarContrastEnforced = false
}
@Suppress("DEPRECATION")
window.navigationBarColor = android.graphics.Color.TRANSPARENT
@Suppress("DEPRECATION")
window.statusBarColor = android.graphics.Color.TRANSPARENT
}
}
}
val screenWidth: Int inline get() = Resources.getSystem().displayMetrics.widthPixels
@Suppress("unused")
val screenHeight: Int inline get() = Resources.getSystem().displayMetrics.heightPixels