/* set the search time in here, in case a plugin
already spent some time indexing the mailbox */
ctx->search_start_time = ioloop_timeval;
- } else if (box->storage->callbacks->notify_ok != NULL) {
+ } else if (box->storage->callbacks->notify_ok != NULL &&
+ !ctx->mail_ctx.progress_hidden) {
percentage = ctx->mail_ctx.progress_cur * 100.0 /
ctx->mail_ctx.progress_max;
msecs = (ioloop_timeval.tv_sec -
ARRAY_DEFINE(module_contexts, union mail_search_module_context *);
unsigned int seen_lost_data:1;
+ unsigned int progress_hidden:1;
};
struct mail_save_context {
ctx->headers = str_new(default_pool, 512);
ctx->mail = mail_alloc(t, 0, NULL);
ctx->search_ctx = mailbox_search_init(t, search_args, NULL);
+ ctx->search_ctx->progress_hidden = TRUE;
ctx->search_args = search_args;
fctx->build_ctx = ctx;
ctx->progress_max = array_count(&fctx->definite_seqs) +
array_count(&fctx->maybe_seqs);
}
+ ctx->progress_cur = 0;
}
static bool fts_try_build_init(struct mail_search_context *ctx,
if (fctx->build_ctx == NULL) {
/* the index was up to date */
fts_search_init_lookup(ctx, fctx);
+ } else {
+ /* hide "searching" notifications */
+ ctx->progress_hidden = TRUE;
}
return TRUE;
}
}
/* finished / error */
+ ctx->progress_hidden = FALSE;
if (fts_build_deinit(&fctx->build_ctx) < 0)
ret = -1;
if (ret > 0) {