update logic check height typingPreview
This commit is contained in:
@@ -997,30 +997,13 @@ namespace BrewMonster.Scripts.ChatUI
|
||||
inputField.ActivateInputField();
|
||||
}
|
||||
|
||||
float GetVisibleKeyboardHeight()
|
||||
{
|
||||
if (!TouchScreenKeyboard.visible)
|
||||
return 0f;
|
||||
|
||||
Rect area = TouchScreenKeyboard.area;
|
||||
return area.height > 0f ? area.height : 0f;
|
||||
}
|
||||
|
||||
void UpdateTypingPreviewFromInput()
|
||||
{
|
||||
if (inputField == null)
|
||||
return;
|
||||
|
||||
string body = ExtractMessageBodyFromVisual(inputField.text ?? "");
|
||||
typingPreview?.UpdatePreview(inputField.isFocused, body, CanShowTypingPreviewNow());
|
||||
}
|
||||
|
||||
bool CanShowTypingPreviewNow()
|
||||
{
|
||||
if (!Application.isMobilePlatform)
|
||||
return false;
|
||||
|
||||
return TouchScreenKeyboard.visible;
|
||||
typingPreview?.UpdatePreview(inputField.isFocused, body);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user