Commit b6671a03 b6671a035bf23e10299749504cd26c33ab4ea004 by Sergey Poznyakoff

imap4d: further improvements.

* imap4d/sync.c (notify): Do not emit FETCH replies for recent
messages.
1 parent ab6e7ba0
...@@ -81,6 +81,7 @@ notify (void) ...@@ -81,6 +81,7 @@ notify (void)
81 } 81 }
82 else 82 else
83 { 83 {
84 size_t old_total = attr_table_count;
84 size_t i; 85 size_t i;
85 86
86 realloc_attributes (total); 87 realloc_attributes (total);
...@@ -94,13 +95,18 @@ notify (void) ...@@ -94,13 +95,18 @@ notify (void)
94 mu_message_get_attribute (msg, &nattr); 95 mu_message_get_attribute (msg, &nattr);
95 mu_attribute_get_flags (nattr, &nflags); 96 mu_attribute_get_flags (nattr, &nflags);
96 97
97 if (nflags != attr_table[i-1]) 98 if (i <= old_total)
98 { 99 {
99 io_sendf ("* %lu FETCH FLAGS (", (unsigned long) i); 100 if (nflags != attr_table[i-1])
100 util_format_attribute_flags (iostream, nflags); 101 {
101 io_sendf (")\n"); 102 io_sendf ("* %lu FETCH FLAGS (", (unsigned long) i);
102 attr_table[i-1] = nflags; 103 util_format_attribute_flags (iostream, nflags);
104 io_sendf (")\n");
105 attr_table[i-1] = nflags;
106 }
103 } 107 }
108 else
109 attr_table[i-1] = nflags;
104 } 110 }
105 } 111 }
106 112
......