From ed36c99ff9b392c32b62d8721aea9557a6de1266 Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Mon, 18 Mar 2024 12:40:20 -0500 Subject: [PATCH] Fix emoji tone popup being misplaced for 1 frame --- java/src/org/futo/inputmethod/latin/uix/actions/EmojiAction.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/src/org/futo/inputmethod/latin/uix/actions/EmojiAction.kt b/java/src/org/futo/inputmethod/latin/uix/actions/EmojiAction.kt index 849153435..257b643e1 100644 --- a/java/src/org/futo/inputmethod/latin/uix/actions/EmojiAction.kt +++ b/java/src/org/futo/inputmethod/latin/uix/actions/EmojiAction.kt @@ -226,6 +226,7 @@ fun Emojis( var viewWidth by remember { mutableIntStateOf(0) } var viewHeight by remember { mutableIntStateOf(0) } + var popupSize by remember { mutableStateOf(IntSize(0, 0)) } Box(modifier = modifier) { AndroidView( @@ -267,8 +268,6 @@ fun Emojis( ) activePopup?.let { popupInfo -> - var popupSize by remember { mutableStateOf(IntSize(0, 0)) } - val posX = popupInfo.x - popupSize.width / 2 val posY = popupInfo.y - popupSize.height