aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-08-22 09:53:56 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-22 09:57:23 +0200
commitd138da0c9fe40ae1adb152da4a22bea2fb86be19 (patch)
tree905855c68d5bcaa24503c714fc73bd561aaacaab /widgets
parent62ac7a507172934ee46304be9da8c3e8a8f5d438 (diff)
downloadaerc-d138da0c9fe40ae1adb152da4a22bea2fb86be19.tar.gz
dirtree: fix build errors
Fix the following errors: widgets/dirtree.go:401:18: not enough arguments in call to dt.UiConfig have () want (string) (typecheck) if dt.UiConfig().DirListCollapse != 0 { ^ widgets/dirtree.go:402:38: not enough arguments in call to dt.UiConfig have () want (string) (typecheck) node.Hidden = depth > dt.UiConfig().DirListCollapse ^ Since commit e0b62db583c3 ("fix: Set proper UIConfig for msgstores"), DirectoryTree.UiConfig() takes a path parameter. Fixes: db39ca181adf ("dirtree: add dirtree-collapse config setting") Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/dirtree.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/widgets/dirtree.go b/widgets/dirtree.go
index eb0af6ed..eae2f7d1 100644
--- a/widgets/dirtree.go
+++ b/widgets/dirtree.go
@@ -386,6 +386,7 @@ func (dt *DirectoryTree) buildTreeNode(node *types.Thread, stree [][]string, def
keys = append(keys, key)
}
sort.Strings(keys)
+ path := dt.getDirectory(node)
for _, key := range keys {
next := m[key]
var uid uint32 = defaultUid
@@ -398,8 +399,8 @@ func (dt *DirectoryTree) buildTreeNode(node *types.Thread, stree [][]string, def
}
nextNode := &types.Thread{Uid: uid}
node.AddChild(nextNode)
- if dt.UiConfig().DirListCollapse != 0 {
- node.Hidden = depth > dt.UiConfig().DirListCollapse
+ if dt.UiConfig(path).DirListCollapse != 0 {
+ node.Hidden = depth > dt.UiConfig(path).DirListCollapse
}
dt.buildTreeNode(nextNode, next, defaultUid, depth+1)
}