aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorKeenan Gugeler <me@kgugeler.ca>2023-08-18 05:26:52 +0000
committerRobin Jarry <robin@jarry.cc>2023-08-25 14:07:25 +0200
commit91a8535a190137b4b6451658274acfefa6660847 (patch)
tree8192278c44a4632debbe2da1ff9b7101881a124c /widgets/dirlist.go
parent4e6d04bf20baf37f104b2bedd9555992b79dbff4 (diff)
downloadaerc-91a8535a190137b4b6451658274acfefa6660847.tar.gz
dirlist: apply unread style on top of recent style
In the documentation, we specify that the `dirlist_recent` style applies on top of the `dirlist_unread` style, but the switch statement we had only applied one of the two. Signed-off-by: Keenan Gugeler <me@kgugeler.ca> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 7d427dcc..b58a9a5c 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -286,12 +286,12 @@ func (dirlist *DirectoryList) renderDir(
var style tcell.Style
r, u, _ := dirlist.GetRUECount(path)
- switch {
- case r > 0:
- styles = append(styles, config.STYLE_DIRLIST_RECENT)
- case u > 0:
+ if u > 0 {
styles = append(styles, config.STYLE_DIRLIST_UNREAD)
}
+ if r > 0 {
+ styles = append(styles, config.STYLE_DIRLIST_RECENT)
+ }
conf = conf.ForFolder(path)
if selected {
style = conf.GetComposedStyleSelected(