聊天重做前缓存

This commit is contained in:
rucky
2026-04-09 09:46:47 +08:00
parent 6e18269bfd
commit e915bbd74a
39 changed files with 8501 additions and 2308 deletions

View File

@@ -444,6 +444,10 @@ local function ApplyChoices()
SFramesDB.enableChat = c.enableChat
if type(SFramesDB.Chat) ~= "table" then SFramesDB.Chat = {} end
SFramesDB.Chat.translateEnabled = c.translateEnabled
-- 翻译关闭时,聊天监控也自动关闭
if c.translateEnabled == false then
SFramesDB.Chat.chatMonitorEnabled = false
end
SFramesDB.Chat.hcGlobalDisable = c.hcGlobalDisable
SFramesDB.enableUnitFrames = c.enableUnitFrames
@@ -1316,9 +1320,14 @@ function SW:DoSkip()
self:Hide()
return
end
-- First-run: apply defaults
if not SFramesDB then SFramesDB = {} end
SFramesDB.setupComplete = true
-- First-run: apply defaults then initialize
choices = GetDefaultChoices()
local ok, err = pcall(ApplyChoices)
if not ok then
if not SFramesDB then SFramesDB = {} end
SFramesDB.setupComplete = true
DEFAULT_CHAT_FRAME:AddMessage("|cffff4444[Nanami-UI] Wizard skip apply error: "..tostring(err).."|r")
end
self:Hide()
if completeCb then completeCb() end
end