performance tweaks for saved searches
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
AuxVersion = '2.4.8'
|
AuxVersion = '2.4.9'
|
||||||
AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)'
|
AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)'
|
||||||
|
|
||||||
Aux = {
|
Aux = {
|
||||||
|
|||||||
+4
-4
@@ -41,7 +41,7 @@ private.elements = {
|
|||||||
function private.update_search_listings()
|
function private.update_search_listings()
|
||||||
local favorite_search_rows = {}
|
local favorite_search_rows = {}
|
||||||
for i, favorite_search in ipairs(aux_favorite_searches) do
|
for i, favorite_search in ipairs(aux_favorite_searches) do
|
||||||
local name = favorite_search.name or Aux.test.prettify_search(favorite_search.filter_string)
|
local name = favorite_search.name or favorite_search.prettified
|
||||||
tinsert(favorite_search_rows, {
|
tinsert(favorite_search_rows, {
|
||||||
cols = {{value=name}},
|
cols = {{value=name}},
|
||||||
search = favorite_search,
|
search = favorite_search,
|
||||||
@@ -53,7 +53,7 @@ function private.update_search_listings()
|
|||||||
|
|
||||||
local recent_search_rows = {}
|
local recent_search_rows = {}
|
||||||
for i, recent_search in ipairs(aux_recent_searches) do
|
for i, recent_search in ipairs(aux_recent_searches) do
|
||||||
local name = recent_search.name or Aux.test.prettify_search(recent_search.filter_string)
|
local name = recent_search.name or recent_search.prettified
|
||||||
tinsert(recent_search_rows, {
|
tinsert(recent_search_rows, {
|
||||||
cols = {{value=name}},
|
cols = {{value=name}},
|
||||||
search = recent_search,
|
search = recent_search,
|
||||||
@@ -717,7 +717,7 @@ end
|
|||||||
OnEnter = function(st, data, self)
|
OnEnter = function(st, data, self)
|
||||||
if not data then return end
|
if not data then return end
|
||||||
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
|
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
|
||||||
GameTooltip:AddLine(gsub(Aux.test.prettify_search(data.search.filter_string), ';', '\n'), 255/255, 254/255, 250/255)
|
GameTooltip:AddLine(gsub(data.search.prettified, ';', '\n'), 255/255, 254/255, 250/255)
|
||||||
GameTooltip:Show()
|
GameTooltip:Show()
|
||||||
-- GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
|
-- GameTooltip:SetOwner(self, 'ANCHOR_RIGHT')
|
||||||
-- GameTooltip:AddLine(data.search, 1, 1, 1, true)
|
-- GameTooltip:AddLine(data.search, 1, 1, 1, true)
|
||||||
@@ -787,7 +787,7 @@ function public.start_search()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
tinsert(aux_recent_searches, 1, { filter_string = private.search_box:GetText() })
|
tinsert(aux_recent_searches, 1, { filter_string = private.search_box:GetText(), prettified = Aux.test.prettify_search(private.search_box:GetText()) })
|
||||||
while getn(aux_recent_searches) > 50 do
|
while getn(aux_recent_searches) > 50 do
|
||||||
tremove(aux_recent_searches)
|
tremove(aux_recent_searches)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user