Clean up WeakAuras table and remove members that no one should touch

This commit is contained in:
NoM0Re
2025-01-09 15:14:12 +01:00
parent e5938f813d
commit a5dbbd2640
33 changed files with 529 additions and 467 deletions
+7 -7
View File
@@ -1676,7 +1676,7 @@ local methods = {
uidMap:ChangeId(uid, existingData.id)
else
if WeakAuras.GetData(uidMap:GetIdFor(uid)) then
local newId = WeakAuras.FindUnusedId(uidMap:GetIdFor(uid))
local newId = OptionsPrivate.Private.FindUnusedId(uidMap:GetIdFor(uid))
uidMap:ChangeId(uid, newId)
end
end
@@ -1731,7 +1731,7 @@ local methods = {
if string.sub(data.id, 1, #targetName) == targetName then
-- Our name is already prefixed with targetName, don't try to improve
else
local newId = WeakAuras.FindUnusedId(targetName)
local newId = OptionsPrivate.Private.FindUnusedId(targetName)
local oldid = data.id
WeakAuras.Rename(data, newId)
if targetName[aura.uid] then -- We can hope that the aura the squatter renames itself, so try again
@@ -1851,7 +1851,7 @@ local methods = {
data.authorMode = nil
WeakAuras.Add(data)
OptionsPrivate.Private.SetHistory(data.uid, data, "import")
local button = WeakAuras.GetDisplayButton(data.id)
local button = OptionsPrivate.GetDisplayButton(data.id)
button:SetData(data)
if (data.parent) then
local parentIsDynamicGroup = structureUidMap:GetParentIsDynamicGroup(uid)
@@ -1875,14 +1875,14 @@ local methods = {
for i = #phase2Order, 1, -1 do
local uid = phase2Order[i]
local data = OptionsPrivate.Private.GetDataByUID(uid)
local displayButton = WeakAuras.GetDisplayButton(data.id)
local displayButton = OptionsPrivate.GetDisplayButton(data.id)
displayButton:UpdateOffset()
end
end,
ImportPhase1 = function(self, uidMap, uid, phase2Order)
tinsert(phase2Order, uid)
local data = uidMap:GetPhase1Data(uid)
local newId = WeakAuras.FindUnusedId(data.id)
local newId = OptionsPrivate.Private.FindUnusedId(data.id)
uidMap:ChangeId(uid, newId)
data.preferToUpdate = false
@@ -1913,7 +1913,7 @@ local methods = {
WeakAuras.Add(data)
OptionsPrivate.Private.SetHistory(data.uid, data, "import")
local button = WeakAuras.GetDisplayButton(data.id)
local button = OptionsPrivate.GetDisplayButton(data.id)
button:SetData(data)
if (data.parent) then
local parentIsDynamicGroup = uidMap:GetParentIsDynamicGroup(uid)
@@ -1936,7 +1936,7 @@ local methods = {
for i = #phase2Order, 1, -1 do
local uid = phase2Order[i]
local data = OptionsPrivate.Private.GetDataByUID(uid)
local displayButton = WeakAuras.GetDisplayButton(data.id)
local displayButton = OptionsPrivate.GetDisplayButton(data.id)
displayButton:UpdateOffset()
end