Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WagoUI_Libraries/LibAddonProfiles/modules/ElvUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ local _, loadingAddonNamespace = ...
---@type LibAddonProfilesPrivate
local private = loadingAddonNamespace.GetLibAddonProfilesInternal and loadingAddonNamespace:GetLibAddonProfilesInternal()
if (not private) then return end
local EXPORT_PREFIX = "!E1!"
local EXPORT_PREFIX = "!E2!"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate all loaded ElvUI modules to E2

When ElvUI v15.19 produces an E2 account-settings or aura-filter export, Creator cannot recognize it: load.xml still loads ElvUIGlobal.lua and ElvUIAuraFilters.lua, but both modules retain EXPORT_PREFIX = "!E1!" even though their shared Distributor:GetProfileExport now emits E2 strings. Consequently those profiles can be exported but fail testImport; apply the E2 format/version migration to every loaded ElvUI export module rather than only the main and private-profile modules.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot elvui has 4 profiles...


---@type LibAddonProfilesModule
local m = {
moduleName = "ElvUI",
wagoId = "tukui--2",
oldestSupported = "v13.76",
oldestSupported = "v15.19",
addonNames = { "ElvUI", "ElvUI_Libraries", "ElvUI_Options" },
conflictingAddons = { "Bartender4", "ShadowedUnitFrames", "ShadowedUF_Options", "PitBull4" },
icon = C_AddOns.GetAddOnMetadata("ElvUI", "IconTexture"),
Expand Down
19 changes: 7 additions & 12 deletions WagoUI_Libraries/LibAddonProfiles/modules/ElvUIPrivate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ local _, loadingAddonNamespace = ...
---@type LibAddonProfilesPrivate
local private = loadingAddonNamespace.GetLibAddonProfilesInternal and loadingAddonNamespace:GetLibAddonProfilesInternal()
if (not private) then return end
local EXPORT_PREFIX = "!E1!"
local EXPORT_PREFIX = "!E2!"

---@type LibAddonProfilesModule
local m = {
moduleName = "ElvUI Private Profile",
oldestSupported = "v13.76",
oldestSupported = "v15.19",
addonNames = { "ElvUI", "ElvUI_Libraries", "ElvUI_Options" },
icon = C_AddOns.GetAddOnMetadata("ElvUI", "IconTexture"),
slash = "/ec",
Expand Down Expand Up @@ -103,18 +103,13 @@ local m = {
profileData = E:FilterTableFromBlacklist(profileData, D.blacklistedKeys.private)
if not profileData or (profileData and type(profileData) ~= 'table') then return end

local profileExport
local serialString = D:Serialize(profileData)
local serialString = C_EncodingUtil.SerializeCBOR(profileData)
local success, exportString = pcall(D.CreateProfileExport, D, 'private', profileKey, serialString)
if not success then
return
end
local LibDeflate = LibStub:GetLibrary("LibDeflateAsync")
local compressedData = LibDeflate:CompressDeflate(exportString, { level = 5 })
local printableString = LibDeflate:EncodeForPrint(compressedData)
profileExport = printableString and format('%s%s', EXPORT_PREFIX, printableString) or nil
if not success then return end

return profileExport
local compressedData = C_EncodingUtil.CompressString(exportString, Enum.CompressionMethod.Deflate or 0, Enum.CompressionLevel.Default or 0)
local printableString = C_EncodingUtil.EncodeBase64(compressedData)
return printableString and format('%s%s', EXPORT_PREFIX, printableString) or nil
end,
areProfileStringsEqual = function(self, profileStringA, profileStringB, tableA, tableB)
if not profileStringA or not profileStringB then
Expand Down