mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-29 03:18:37 +00:00
android fix
This commit is contained in:
+12
-1
@@ -31,7 +31,7 @@ fun Modifier.blurredBackgroundModifier(
|
||||
return this
|
||||
|
||||
return if (appPlatform.isAndroid) {
|
||||
this.desktopBlurredModifier(keyboardInset, blurRadius, keyboardCoversBar, onTop, graphicsLayer, backgroundGraphicsLayer, backgroundGraphicsLayerSize, density)
|
||||
this.androidBlurredModifier(keyboardInset, blurRadius, keyboardCoversBar, onTop, graphicsLayer, backgroundGraphicsLayer, backgroundGraphicsLayerSize, density)
|
||||
} else {
|
||||
this.desktopBlurredModifier(keyboardInset, blurRadius, keyboardCoversBar, onTop, graphicsLayer, backgroundGraphicsLayer, backgroundGraphicsLayerSize, density)
|
||||
}
|
||||
@@ -85,6 +85,17 @@ private fun Modifier.androidBlurredModifier(
|
||||
drawLayer(graphicsLayer)
|
||||
}
|
||||
}
|
||||
.graphicsLayer {
|
||||
if (!onTop) {
|
||||
val bgSize = when {
|
||||
backgroundGraphicsLayerSize.value.height == 0 && backgroundGraphicsLayer.size.height != 0 -> backgroundGraphicsLayer.size.height
|
||||
backgroundGraphicsLayerSize.value.height == 0 -> graphicsLayer.size.height
|
||||
else -> backgroundGraphicsLayerSize.value.height
|
||||
}
|
||||
val keyboardHeightCovered = if (!keyboardCoversBar) keyboardInset.getBottom(density) else 0
|
||||
translationY -= -bgSize + size.height + keyboardHeightCovered
|
||||
}
|
||||
}
|
||||
|
||||
private fun Modifier.desktopBlurredModifier(
|
||||
keyboardInset: WindowInsets,
|
||||
|
||||
Reference in New Issue
Block a user