ingame/tradinghouse/gamepad/tradinghouse_browseresults_gamepad.lua:419 -- TRADING_HOUSE_PREVIEW_GAMEPAD_SCENE:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_SHOWING then
ITEM_PREVIEW_LIST_HELPER_GAMEPAD:RegisterCallback("OnPreviewChanged", UpdatePreviewItemData)
ITEM_PREVIEW_GAMEPAD:SetInteractionCameraPreviewEnabled(true, FRAME_TARGET_CENTERED_FRAGMENT, FRAME_PLAYER_ON_SCENE_HIDDEN_FRAGMENT, GAMEPAD_NAV_QUADRANT_2_3_FURNITURE_ITEM_PREVIEW_OPTIONS_FRAGMENT)
KEYBIND_STRIP:AddKeybindButtonGroup(self.previewKeybindStripDescriptor)
elseif newState == SCENE_SHOWN then
local tradingHouseIndex = ZO_Inventory_GetSlotIndex(self.previewItemData)
local previewIndex = ZO_IndexOfElementInNumericallyIndexedTable(self.previewListEntries, tradingHouseIndex)
local DONT_WRAP = true
ITEM_PREVIEW_LIST_HELPER_GAMEPAD:PreviewList(ZO_ITEM_PREVIEW_TRADING_HOUSE_SEARCH_RESULT_AS_FURNITURE, self.previewListEntries, previewIndex, DONT_WRAP)
elseif newState == SCENE_HIDDEN then
self.previewItemData = nil
ITEM_PREVIEW_GAMEPAD:SetInteractionCameraPreviewEnabled(false, FRAME_TARGET_CENTERED_FRAGMENT, FRAME_PLAYER_ON_SCENE_HIDDEN_FRAGMENT, GAMEPAD_NAV_QUADRANT_2_3_FURNITURE_ITEM_PREVIEW_OPTIONS_FRAGMENT)
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.previewKeybindStripDescriptor)
ITEM_PREVIEW_LIST_HELPER_GAMEPAD:UnregisterCallback("OnPreviewChanged", UpdatePreviewItemData)
end
end)