Correctly validate initial state of toggle icon

Ulrik Larsen [01-28-22 - 17:33]
Correctly validate initial state of toggle icon
Filename
CBs_Settings_Data.lua
CBs_Settings_List.lua
diff --git a/CBs_Settings_Data.lua b/CBs_Settings_Data.lua
index e0e9b8c..20154e0 100644
--- a/CBs_Settings_Data.lua
+++ b/CBs_Settings_Data.lua
@@ -278,7 +278,7 @@ function base.AppendMasterListTypeCategories(self, listType)

 		if category.HasChildren then
 			toolTipText = string.format("Click to toggle subcategories for\n%s", category.Name)
-			icon = base.ToggleButtonIcon[base.ToggleButtonState.CLOSED]
+			icon = base.ToggleButtonIcon[base.Global.ShowChildren[category.Name] == base.ToggleButtonState.OPEN]
 		else
 			toolTipText = string.format("When ON the collection category:\n%s will enabled\n\nPress the 'cog' to display collectible in the tabs: 'Collectibles' and 'Category'\n and Right click wil also change the tab", category.Name)
 			icon = category.Icon
diff --git a/CBs_Settings_List.lua b/CBs_Settings_List.lua
index 636f268..be68857 100644
--- a/CBs_Settings_List.lua
+++ b/CBs_Settings_List.lua
@@ -537,8 +537,6 @@ function CBs_Settings_List:FilterScrollList()
 			if self.masterListType == "Categories" and listElement.parentKey ~= nil then
 				local showChildren = base.Global.ShowChildren[listElement.parentKey]

-				base:Debug("FilterScrollList", base.Global.ShowChildren, listElement.parentKey, base.Global.ShowChildren[listElement.parentKey])
-
 				if showChildren then
 					scrollData[#scrollData + 1] = ZO_ScrollList_CreateDataEntry(listElement.dataTypeId, listElement)
 				end