@@ -125,6 +125,7 @@ impl MessageCacheFetch for Server {
125125 let mut changed_items: AHashMap < u32 , bool > = AHashMap :: with_capacity ( changes. changes . len ( ) ) ;
126126 let mut changed_containers: AHashMap < u32 , bool > =
127127 AHashMap :: with_capacity ( changes. changes . len ( ) ) ;
128+ let mut has_container_property_changes = false ;
128129
129130 for change in changes. changes {
130131 match change {
@@ -156,7 +157,9 @@ impl MessageCacheFetch for Server {
156157 Change :: DeleteContainer ( id) => {
157158 changed_containers. insert ( id as u32 , false ) ;
158159 }
159- Change :: UpdateContainerProperty ( _) => ( ) ,
160+ Change :: UpdateContainerProperty ( _) => {
161+ has_container_property_changes = true ;
162+ }
160163 }
161164 }
162165
@@ -172,6 +175,10 @@ impl MessageCacheFetch for Server {
172175 update_mailbox_cache ( self , account_id, & changed_containers, & cache) . await ?;
173176 mailbox_cache. change_id = changes. container_change_id . unwrap_or ( changes. to_change_id ) ;
174177 cache. mailboxes = Arc :: new ( mailbox_cache) ;
178+ } else if has_container_property_changes {
179+ let mut mailbox_cache = cache. mailboxes . as_ref ( ) . clone ( ) ;
180+ mailbox_cache. change_id = changes. container_change_id . unwrap_or ( changes. to_change_id ) ;
181+ cache. mailboxes = Arc :: new ( mailbox_cache) ;
175182 }
176183 cache. size = cache. emails . size + cache. mailboxes . size ;
177184 cache. last_change_id = changes. to_change_id ;
0 commit comments