Automatically load dircounts after enabling it (#2049)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-07-19 14:35:13 +10:00
1 parent f2d5d08952
commit c31b92491f
2 files changed
+13 -1

No files matched your search

+9 -1
View File
@@ -625,8 +625,16 @@ func (nav *nav) checkDir(dir *dir) {
nd := newDir(dir.path)
nav.dirChan <- nd
}()
case dir.dircounts != getDirCounts(dir.path):
dir.loading = true
go func() {
nd := newDir(dir.path)
nav.dirChan <- nd
}()
// Although toggling dircounts can affect sorting, it is already handled by
// reloading the directory which should sort the files anyway, so it is not
// checked below.
case dir.sortby != getSortBy(dir.path) ||
dir.dircounts != getDirCounts(dir.path) ||
dir.dirfirst != getDirFirst(dir.path) ||
dir.dironly != getDirOnly(dir.path) ||
dir.hidden != getHidden(dir.path) ||