ingame/zo_quest/gamepad/questjournal_gamepad.lua:294 -- GAMEPAD_QUEST_JOURNAL_ROOT_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
self:PerformDeferredInitialization()
if self.listDirty then
self:RefreshQuestCount()
self:RefreshQuestMasterList()
self:RefreshQuestList()
end
self:FocusQuestWithIndex(QUEST_JOURNAL_MANAGER:GetFocusedQuestIndex())
self:SetCurrentList(self.questList)
ZO_GamepadGenericHeader_Refresh(self.header, self.headerData)
ZO_GamepadGenericHeader_Refresh(self.contentHeader, self.contentHeaderData)
if not returningFromOptions then
local questListEmpty = self.questList:IsEmpty()
if questListEmpty then
self:RefreshDetails()
elseif QUEST_JOURNAL_MANAGER:GetFocusedQuestIndex() then
self:SelectFocusedQuest()
elseif not questListEmpty then
self.questList:SetSelectedIndexWithoutAnimation(1)
end
else
returningFromOptions = false
end
self:SetKeybindButtonGroup(self.mainKeybindStripDescriptor)
elseif newState == SCENE_HIDDEN then
self.questList:Deactivate()
self:SetKeybindButtonGroup(nil)
end
end)