From 89b742dc6c2cc4e70cc7fd44454ee184dcc4b627 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 15 Feb 2020 14:14:44 +0100 Subject: Request DirInfo whenever the unread count may have changed Actions such as read / unread or the addition of new messages do change the read/unread/recent count. Hence we request an update from the workers. Workers going over the network should probably cache the information and invalidate it only if necessary --- worker/types/messages.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'worker') diff --git a/worker/types/messages.go b/worker/types/messages.go index c7d5077..f43ab0a 100644 --- a/worker/types/messages.go +++ b/worker/types/messages.go @@ -149,6 +149,13 @@ type DirectoryInfo struct { Info *models.DirectoryInfo } +// Sent whenever we assume that a directory content changed +// workers are requested to update the DirectoryInfo to display the unread count +type DirectoryInfoUpdateRequest struct { + Message + Name string +} + type DirectoryContents struct { Message Uids []uint32 -- cgit v1.2.3