~rjarry/aerc

7f69618ac1fd29a2de7404581fae9d5249f9c47d — Robin Jarry a month ago 49afb05
dirtree: fix dirlist-collapse=0 regression

Ensure not to collapse any folder when dirlist-collapse=0.

Fixes: 73dc39c6ee08 ("treewide: replace uint32 uids with opaque strings")
Reported-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
1 files changed, 2 insertions(+), 1 deletions(-)

M app/dirtree.go
M app/dirtree.go => app/dirtree.go +2 -1
@@ 477,7 477,8 @@ func (dt *DirectoryTree) buildTreeNode(node *types.Thread, dirs []string, depth 
	sort.Strings(bases)

	basePath := dt.getDirectory(node)
	if depth > dt.UiConfig(basePath).DirListCollapse {
	collapse := dt.UiConfig(basePath).DirListCollapse
	if collapse != 0 && depth > collapse {
		node.Hidden = 1
	} else {
		node.Hidden = 0