aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dirstore.go
Commit message (Collapse)AuthorAgeFilesLines
* dirstore: list the folders in arrival orderKoni Marti2023-05-281-1/+10
| | | | | | | | | | | | | List the folders in arrival order when dirstore.List() is called instead of returning it in an arbitrary order. If enable-folders-sort=false and dirlist-tree=false, the directory list will arbitrarly reshuffle when changing directories because the dirlist.dirs are generated from keys in a map in the dirstore. Fixes: https://todo.sr.ht/~rjarry/aerc/178 Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* directory: use directory to store rue countsTim Culverhouse2023-04-221-0/+4
| | | | | | | | | | | | Store the Directory RUE counts on the Directory data model. Use DirectoryInfo messages to update the Directory model. Access Directories via the dirlist instead of via the msgstore. Remove unused fields on DirectoryInfo, all backends now give accurate counts. Move refetch logic into dirlist Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry<robin@jarry.cc>
* dirstore: store directory model in dirstoreTim Culverhouse2023-04-221-4/+11
| | | | | | | | Use the dirstore to store models.Directory data structures. This will be used in subsequent commits for accessing directory data. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* listDirectories: refactor listdirectories handlingTim Culverhouse2023-04-221-7/+9
| | | | | | | | | | | | | | | | | ListDirectories is called when connecting, reconnecting, and creation/deletion of a directory. The code is not in the same style as other areas of aerc. Refactor to match coding style of the rest of aerc by creating an Update function which handles necessary updates in the dirlist. This style does not use a callback, making it clearer what is happening in the message flow, and operates similar to how the msgstore receives updates. Use a map in the dirstore to reduce duplicate storage of directory names. Directly add or remove directories from the map when created / deleted to prevent a new ListDirectories message, and a flash of the UI. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* Move msgstore map to dirstoreJeffas2019-07-261-2/+13
| | | | | | This map represents a mapping from directory names to their associated messagestores anyway so they should be under dirstore. This simply moves them there and adds some methods required to interact with them.
* Sort out dirstore once and for allDrew DeVault2019-07-041-3/+1
|
* Add new lib/dirstore to source completions fromGregory Mullen2019-06-291-0/+20