Defer updates until fully loaded

This commit is contained in:
2020-12-16 15:31:30 -05:00
parent c30f0fe3ae
commit 3fd9daf009
2 changed files with 17 additions and 1 deletions

View File

@@ -363,6 +363,10 @@ local function SetSort(cell, sort)
private.db.global.sort_dir = "ASC" private.db.global.sort_dir = "ASC"
end end
if not private.loaded then
return
end
TillerTracker:UpdateData() TillerTracker:UpdateData()
TillerTracker:UpdateTooltip() TillerTracker:UpdateTooltip()
end end
@@ -648,6 +652,10 @@ function LDB.OnEnter(self)
end end
function TillerTracker:QUEST_LOG_UPDATE() function TillerTracker:QUEST_LOG_UPDATE()
if not private.loaded then
return
end
TillerTracker:UpdateData() TillerTracker:UpdateData()
TillerTracker:UpdateText() TillerTracker:UpdateText()
@@ -659,6 +667,10 @@ function TillerTracker:QUEST_LOG_UPDATE()
end end
function TillerTracker:BAG_UPDATE() function TillerTracker:BAG_UPDATE()
if not private.loaded then
return
end
TillerTracker:UpdateData() TillerTracker:UpdateData()
TillerTracker:UpdateText() TillerTracker:UpdateText()
@@ -718,6 +730,10 @@ end
function TillerTracker:SetPlanAhead(value) function TillerTracker:SetPlanAhead(value)
private.db.global.plan_ahead = value private.db.global.plan_ahead = value
if not private.loaded then
return
end
TillerTracker:UpdateData() TillerTracker:UpdateData()
TillerTracker:UpdateText() TillerTracker:UpdateText()

View File

@@ -1,6 +1,6 @@
## Interface: 90002 ## Interface: 90002
## Title: Tiller Tracker ## Title: Tiller Tracker
## Version: 9.0.4 ## Version: 9.0.5
## Notes: Helps with the daily Tiller food quests ("A Dish for...") by keeping track of what quests have been completed that day, how many dishes need to be cooked, and what materials are required. ## Notes: Helps with the daily Tiller food quests ("A Dish for...") by keeping track of what quests have been completed that day, how many dishes need to be cooked, and what materials are required.
## Author: Amanoa ## Author: Amanoa
## SavedVariables: TillerTrackerDB ## SavedVariables: TillerTrackerDB