Skip to content

Commit

Permalink
Fixed compatibility with wotlk classic
Browse files Browse the repository at this point in the history
  • Loading branch information
linaori committed Apr 7, 2023
1 parent 0826ee1 commit 8348eaf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ local function SetUpSettings()

local MainFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)

local category = Settings.RegisterCanvasLayoutCategory(MainFrame, addonName)
Settings.RegisterAddOnCategory(category)
if Settings then
Settings.RegisterAddOnCategory(Settings.RegisterCanvasLayoutCategory(MainFrame, addonName))
else
MainFrame.name = addonName .. " " .. COMMUNITIES_NOTIFICATION_SETTINGS_DIALOG_SETTINGS_LABEL
end

MainFrame.title = MainFrame:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
MainFrame.title:SetPoint("TOPLEFT", 16, -16)
Expand Down Expand Up @@ -77,7 +80,7 @@ local function SetUpSettings()
MainFrame.MinimapIconCheckbox = newCheckbox("Option5",
L["Show Minimap icon"],
"",
function(self, value)
function(_, value)
WowUpAddonInformation.showMinimapIcon = value
if value then
if not WOWUP.icon:IsRegistered(addonName) then
Expand All @@ -100,7 +103,12 @@ local function SetUpSettings()
_G["SLASH_WOWUP1"] = WOWUP_DATA.addonManagerNameSlashCommand

SlashCmdList["WOWUP"] = function()
Settings.OpenToCategory(addonName)
if settings then
Settings.OpenToCategory(addonName)
else
InterfaceOptionsFrame_OpenToCategory(addonName .. " " .. COMMUNITIES_NOTIFICATION_SETTINGS_DIALOG_SETTINGS_LABEL)
InterfaceOptionsFrame_OpenToCategory(addonName .. " " .. COMMUNITIES_NOTIFICATION_SETTINGS_DIALOG_SETTINGS_LABEL)
end
end
end

Expand Down

0 comments on commit 8348eaf

Please sign in to comment.