server: maybe mark updates with :maybe-view

Don't updates messages when it's not needed, but don't use :view, since
it confuses mu4e's handlers.
This commit is contained in:
djcb
2018-08-18 11:37:31 +03:00
parent 6fd6d839d7
commit 16fa5d9a22
2 changed files with 13 additions and 15 deletions

View File

@ -1207,15 +1207,13 @@ do_move (MuStore *store, unsigned docid, MuMsg *msg, const char *maildir,
print_and_clear_g_error (err); print_and_clear_g_error (err);
} }
if (!no_view) {
sexp = mu_msg_to_sexp (msg, docid, NULL, MU_MSG_OPTION_VERIFY); sexp = mu_msg_to_sexp (msg, docid, NULL, MU_MSG_OPTION_VERIFY);
/* note, the :move t thing is a hint to the frontend that it /* note, the :move t thing is a hint to the frontend that it
* could remove the particular header */ * could remove the particular header */
print_expr ("(:update %s :move %s :view %s)", sexp, print_expr ("(:update %s :move %s :maybe-view %s)", sexp,
different_mdir ? "t" : "nil", different_mdir ? "t" : "nil",
no_view ? "nil" : "t"); no_view ? "nil" : "t");
g_free (sexp); g_free (sexp);
}
return MU_OK; return MU_OK;
} }

View File

@ -196,7 +196,7 @@ The server output is as follows:
(funcall mu4e-update-func (funcall mu4e-update-func
(plist-get sexp :update) (plist-get sexp :update)
(plist-get sexp :move) (plist-get sexp :move)
(plist-get sexp :view))) (plist-get sexp :maybe-view)))
;; a message got removed ;; a message got removed
((plist-get sexp :remove) ((plist-get sexp :remove)