make search work for Learned Recipe List
This commit is contained in:
1 parent
492486fc07
commit
0c956054ff
1 file changed
+3
-4
@@ -71,7 +71,7 @@ function EID:BoCSSetSearchInputEnabled(newState, force)
|
|||||||
if EID.BoCSLockMode == 0 and EID:BoCSGetLocked() and force ~= true then
|
if EID.BoCSLockMode == 0 and EID:BoCSGetLocked() and force ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
newState = newState and EID.Config["BagOfCraftingDisplayRecipesMode"] == "Recipe List"
|
newState = newState and EID.Config["BagOfCraftingDisplayRecipesMode"]:find("Recipe List")
|
||||||
|
|
||||||
searchInputEnabled = newState
|
searchInputEnabled = newState
|
||||||
if newState then
|
if newState then
|
||||||
@@ -95,14 +95,13 @@ end
|
|||||||
|
|
||||||
--- Returns true if the item name is matched
|
--- Returns true if the item name is matched
|
||||||
-- @returns boolean
|
-- @returns boolean
|
||||||
function EID:BoCSCheckItemName(itemName, englishName)
|
function EID:BoCSCheckItemName(itemName)
|
||||||
if searchValue == "" then
|
if searchValue == "" then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check the localized name and English name for matching our search string (accents removed)
|
-- Check the name for matching our search string (accents removed)
|
||||||
return string.find(sanitizeName(itemName), sanitizeName(searchValue), 1, true)
|
return string.find(sanitizeName(itemName), sanitizeName(searchValue), 1, true)
|
||||||
or string.find(sanitizeName(englishName), sanitizeName(searchValue), 1, true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handleSearchInput()
|
local function handleSearchInput()
|
||||||
|
|||||||
Reference in new issue
Block a user