Fix possible race-condition

This commit is contained in:
Gabriel Tofvesson 2024-10-26 00:31:47 +02:00
parent 3e654df2ac
commit da7bbe21c2

View File

@ -548,13 +548,15 @@ local PAGES = {
local keyboardWidth = keyboardList:getWidth()
keyboardList:setPos(math.floor((screenContainer:getWidth() - keyboardWidth) / 2), screenContainer:getHeight() - keyboardList:getHeight() - bottomBarList:getHeight())
local filterDisplayedText = fitText(pageState.filter, keyboardList:getWidth() - (2 * KEYBOARD_HPAD))
local keyboardInnerWidth = keyboardList:getInnerWidth()
local filterDisplayedText = fitText(pageState.filter, keyboardInnerWidth)
local filterText = keyboardList:findById(ID_FILTER_DISPLAY)
filterText:setText(filterDisplayedText)
local filterPadding = keyboardList:findById(ID_FILTER_PADDING)
filterPadding:setPadding{
right = keyboardList:getWidth() - (2 * KEYBOARD_HPAD) - filterText:getWidth()
right = keyboardInnerWidth - filterText:getWidth()
}
keyboardList:setVisible(pageState.displayKeyboard)