This can be simply summed up by the following picture:
A year or so ago, this was happening to me often enough that I created an addon (
MailMenuBarFixer) to re-call MAIN_MENU_KEYBOARD:SetupSceneGroupBar when it occurred. I later expanded it to automatically call it by comparing the string found in MAIN_MENU_KEYBOARD.sceneGroupBarLabel to the name of the scene group and call SetupSceneGroupBar as required.
I haven't run into the issue recently, but a comment on my addon earlier this month indicated that a user was having this issue outside of just the mail interface (they've been having it with the quest interface). I've been working on an automated check on-and-off since then. This is what I've come up with:
Code:
local function fixer ()
-- Not just mail any more!
local scene = SCENE_MANAGER.currentScene.name
local group = MAIN_MENU_KEYBOARD.sceneInfo[scene]
if group == nil then return end
local group_data = MAIN_MENU_KEYBOARD.sceneGroupInfo[group.sceneGroupName]
if group_data == nil then return end
local group_info = group_data.menuBarIconData
local category = group_data.category
local current = MAIN_MENU_KEYBOARD.sceneGroupBarLabel:GetText()
local found = false
for _,data in pairs(group_info) do
if GetString(data.categoryName):upper() == current then
found = true
end
end
if found == false then
CHAT_SYSTEM:AddMessage("[AutoMenuBarFixer] Found '" .. group.sceneGroupName .. "' using string '" .. current .. "'. Fixing!")
MAIN_MENU_KEYBOARD:SetupSceneGroupBar(category, group.sceneGroupName)
end
end
While I'm quite sure that the code is functional (though not necessarily optimal), I don't have any way of testing it completely.
Outside of that, it occurred to me that this is probably an issue that should be reported to ZoS with as much detail as possible. I don't know the exact reproduction circumstances -- it could be linked to lag, when I had it occur regularly it was going from one window (say, the friends interface) to the mail window and having the group bar not update properly.
Given that the only other call of SetupSceneGroupBar is from the callback in zo_mainmenu_keyboard.lua:341, which references MainMenu_Keyboard.sceneShowGroupName, which is set by MainMenu_Keyboard:Update (line 679), it would appear to be either a) an issue where that variable isn't being correctly set -- resulting in a case where the sceneShowGroupName doesn't actually match the scene group being shown, or b) the callback never actually firing.
Anyone have any other ideas?