Skip to content

Commit

Permalink
workaround unstable EJ API and refactor database module
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukme committed Jan 23, 2023
1 parent fdcd16c commit b29ee44
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 346 deletions.
2 changes: 1 addition & 1 deletion Src/Modules/Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ local generalOptions = {
name = L["Reset database"],
desc = L["Recreate the database"],
func = function()
IE:RecreateEJDatabase()
IE:CreateEJDatabase()
end
}
}
Expand Down
5 changes: 2 additions & 3 deletions Src/Modules/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ function IE:CheckDatabase()
local ieversion = GetAddOnMetadata("InspectEquip", "Version")
local locale = GetLocale()
local expansion = GetExpansionLevel()
local reset = false

if self:AreMetasMatching(clientbuild, ieversion, locale, expansion, reset) then
if self:AreMetasMatching(clientbuild, ieversion, locale, expansion) then
IE.DatabaseChecked = true
else
self:ScheduleTimer("CreateEJDatabase", 5)
self:UpdateMetas(clientbuild, ieversion, locale, expansion, reset)
self:UpdateMetas(clientbuild, ieversion, locale, expansion)
end
end

Expand Down
Loading

0 comments on commit b29ee44

Please sign in to comment.