fix(#2930): empty groups expanded on reload (#2935)

This commit is contained in:
Alexander Courtis 2024-09-30 11:21:27 +10:00 committed by GitHub
parent 1ae1c33ce1
commit 4520c0355c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -198,7 +198,7 @@ function Explorer:reload(node, git_status)
local is_root = not node.parent local is_root = not node.parent
local child_folder_only = explorer_node.has_one_child_folder(node) and node.nodes[1] local child_folder_only = explorer_node.has_one_child_folder(node) and node.nodes[1]
if config.group_empty and not is_root and child_folder_only then if config.renderer.group_empty and not is_root and child_folder_only then
node.group_next = child_folder_only node.group_next = child_folder_only
local ns = self:reload(child_folder_only, git_status) local ns = self:reload(child_folder_only, git_status)
node.nodes = ns or {} node.nodes = ns or {}