imap4d: further improvements.
* imap4d/sync.c (notify): Do not emit FETCH replies for recent messages.
Showing
1 changed file
with
11 additions
and
5 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment