struct imapc_mailbox *mbox = context;
mbox->state_fetching_uid1 = FALSE;
+ mbox->delayed_untagged_exists = FALSE;
imapc_client_stop(mbox->storage->client->client);
switch (reply->state) {
mbox->selected = TRUE;
}
-static void
+bool
imapc_mailbox_fetch_state(struct imapc_mailbox *mbox, uint32_t first_uid)
{
struct imapc_command *cmd;
just make sure everything is expunged in local index.
Delay calling imapc_mailbox_fetch_state_finish() until
SELECT finishes, so we see the updated UIDNEXT. */
- return;
+ return FALSE;
}
if (mbox->state_fetching_uid1) {
/* retrying after reconnection - don't send duplicate */
- return;
+ return FALSE;
}
string_t *str = t_str_new(64);
}
mbox->state_fetching_uid1 = first_uid == 1;
imapc_command_send(cmd, str_c(str));
+ return TRUE;
}
static void
{
struct mail_index_view *view;
uint32_t exists_count = reply->num;
- const struct mail_index_header *hdr;
if (mbox == NULL)
return;
if (mbox->selecting) {
/* We don't know the latest flags, refresh them. */
- imapc_mailbox_fetch_state(mbox, 1);
+ (void)imapc_mailbox_fetch_state(mbox, 1);
} else if (mbox->sync_fetch_first_uid != 1) {
+ const struct mail_index_header *hdr;
hdr = mail_index_get_header(view);
mbox->sync_fetch_first_uid = hdr->next_uid;
- imapc_mailbox_fetch_state(mbox, hdr->next_uid);
+ mbox->delayed_untagged_exists = TRUE;
}
imapc_mailbox_idle_notify(mbox);
}
bool state_fetching_uid1:1;
bool state_fetched_success:1;
bool rollback_pending:1;
+ bool delayed_untagged_exists:1;
};
struct imapc_simple_context {
struct imapc_untagged_fetch_ctx *ctx,
struct mail_index_view *view,
uint32_t lseq);
+bool imapc_mailbox_fetch_state(struct imapc_mailbox *mbox, uint32_t first_uid);
#endif