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:
@ -258,11 +258,11 @@ get_bool_from_args (GHashTable *args, const char *param, gboolean optional,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define GET_STRING_OR_ERROR_RETURN(ARGS,PARAM,SP,E) \
|
#define GET_STRING_OR_ERROR_RETURN(ARGS,PARAM,SP,E) \
|
||||||
do { \
|
do { \
|
||||||
*(SP) = get_string_from_args ((ARGS),(PARAM),FALSE,(E)); \
|
*(SP) = get_string_from_args ((ARGS),(PARAM),FALSE,(E)); \
|
||||||
if (!(*(SP))) \
|
if (!(*(SP))) \
|
||||||
return MU_G_ERROR_CODE((E)); \
|
return MU_G_ERROR_CODE((E)); \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
|
||||||
@ -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 :maybe-view %s)", sexp,
|
||||||
print_expr ("(:update %s :move %s :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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,10 +193,10 @@ The server output is as follows:
|
|||||||
|
|
||||||
;; something got moved/flags changed
|
;; something got moved/flags changed
|
||||||
((plist-get sexp :update)
|
((plist-get sexp :update)
|
||||||
(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)
|
||||||
|
|||||||
Reference in New Issue
Block a user