[evolution-ews] I#71 - Color/Score assigned by filter lost on message move
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] I#71 - Color/Score assigned by filter lost on message move
- Date: Fri, 4 Oct 2019 10:37:56 +0000 (UTC)
commit 34ff13deff0ddd2078ca69da7bb82f69e1382016
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 4 12:37:17 2019 +0200
I#71 - Color/Score assigned by filter lost on message move
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/71
src/camel/camel-ews-utils.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index 6ab4c73b..11873a88 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -892,6 +892,8 @@ static void
ews_utils_copy_message_info (CamelMessageInfo *des_mi,
const CamelMessageInfo *src_mi)
{
+ gchar *had_color;
+ gchar *had_score;
gboolean had_cal;
g_return_if_fail (CAMEL_IS_MESSAGE_INFO (des_mi));
@@ -900,7 +902,10 @@ ews_utils_copy_message_info (CamelMessageInfo *des_mi,
camel_message_info_property_lock (des_mi);
+ /* Preserve custom information used by evolution */
had_cal = camel_message_info_get_user_flag (des_mi, "$has_cal");
+ had_color = camel_message_info_dup_user_tag (des_mi, "color");
+ had_score = camel_message_info_dup_user_tag (des_mi, "score");
camel_message_info_set_flags (des_mi, ~CAMEL_MESSAGE_FOLDER_FLAGGED, camel_message_info_get_flags
(src_mi));
camel_message_info_take_user_flags (des_mi, camel_message_info_dup_user_flags (src_mi));
@@ -919,6 +924,10 @@ ews_utils_copy_message_info (CamelMessageInfo *des_mi,
if (had_cal)
camel_message_info_set_user_flag (des_mi, "$has_cal", TRUE);
+ if (had_color)
+ camel_message_info_set_user_tag (des_mi, "color", had_color);
+ if (had_score)
+ camel_message_info_set_user_tag (des_mi, "score", had_score);
if (CAMEL_IS_EWS_MESSAGE_INFO (des_mi) && CAMEL_IS_EWS_MESSAGE_INFO (src_mi)) {
camel_ews_message_info_set_change_key (CAMEL_EWS_MESSAGE_INFO (des_mi),
@@ -926,6 +935,9 @@ ews_utils_copy_message_info (CamelMessageInfo *des_mi,
}
camel_message_info_property_unlock (des_mi);
+
+ g_free (had_color);
+ g_free (had_score);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]