From 64e18b18fc0f956294fee04684d3b7dbcb6b9485 Mon Sep 17 00:00:00 2001 From: Duraid Abdul Date: Sun, 18 Sep 2022 23:31:00 -0600 Subject: [PATCH] Fix keybaord avoidance --- Sources/LocalConsole/LCManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/LocalConsole/LCManager.swift b/Sources/LocalConsole/LCManager.swift index a3a8d0c..d1f6892 100644 --- a/Sources/LocalConsole/LCManager.swift +++ b/Sources/LocalConsole/LCManager.swift @@ -185,7 +185,7 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate { let leftEndpointX = consoleSize.width / 2 + consoleWindow.safeAreaInsets.left + (isLandscapePhone ? 4 : 12) + (isLandscapeRightNotchedPhone ? -16 : 0) let rightEndpointX = screenSize.width - (consoleSize.width / 2 + consoleWindow.safeAreaInsets.right) - (isLandscapePhone ? 4 : 12) + (isLandscapeLeftNotchedPhone ? 16 : 0) let topEndpointY = consoleSize.height / 2 + consoleWindow.safeAreaInsets.top + 12 + (isPortraitNotchedPhone ? -10 : 0) - let bottomEndpointY = screenSize.height - (consoleSize.height / 2 + consoleWindow.safeAreaInsets.bottom) - 12 + (isLandscapePhone ? 10 : 0) + let bottomEndpointY = screenSize.height - consoleSize.height / 2 - (keyboardHeight ?? consoleWindow.safeAreaInsets.bottom) - 12 + (isLandscapePhone ? 10 : 0) if consoleSize.width < screenSize.width - 112 { // Four endpoints, one for each corner.