aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-06-05 20:41:48 +0200
committerRobin Jarry <robin@jarry.cc>2023-06-17 23:19:07 +0200
commitb13c45797a1ea2d27f162c0fde0b640d7b24471e (patch)
treec7aac869d156703add6bb2379546dff0664d1b8a /widgets/dirlist.go
parent04bcfd5cf5aacd60ea70ac773aa6021c4f9c471a (diff)
downloadaerc-b13c45797a1ea2d27f162c0fde0b640d7b24471e.tar.gz
account: create new store when creating folders
Add a correct message store entry to the DirStore for newly created directories. This is currently not done, so the directory name does either not show up in the directory list or contains a nil message store. Either way, such a directory cannot be used in the current session and aerc needs to be restarted/reconnected. This affects the :mkdir and :archive commands (archive when a new directory is created). To reproduce on imap: create a new directory (:mkdir testdir), try to move a message into it (:move testdir). It will not show up because there is not message store. Fixes: 8ced001d ("listDirectories: refactor listdirectories handling") Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 8112ebd2..a1d4eddb 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -117,6 +117,10 @@ func (dirlist *DirectoryList) Update(msg types.WorkerMessage) {
dirlist.store.Remove(msg.Directory)
dirlist.filterDirsByFoldersConfig()
dirlist.sortDirsByFoldersSortConfig()
+ case *types.CreateDirectory:
+ dirlist.filterDirsByFoldersConfig()
+ dirlist.sortDirsByFoldersSortConfig()
+ dirlist.Invalidate()
}
case *types.DirectoryInfo:
dir := dirlist.Directory(msg.Info.Name)