unreadcnt++;
if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
unreadmarkedcnt++;
+ if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
procmsg_msginfo_free(newmsginfo);
}
unreadcnt++;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
unreadmarkedcnt++;
+ if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
}
totalcnt++;
procmsg_msginfo_free(msginfo);
unreadcnt++;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
unreadmarkedcnt++;
+ if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
totalcnt++;
procmsg_msginfo_free(msginfo);
}
unreadcnt++;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
unreadmarkedcnt++;
+ if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
totalcnt++;
procmsg_msginfo_free(msginfo);
debug_print("Added newly found message %d to cache.\n", num);
dest->unread++;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
dest->unreadmarked++;
+ if (procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(msginfo, MSG_IGNORE_THREAD, 0);
dest->total++;
dest->need_update = TRUE;
dest->unread++;
if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
dest->unreadmarked++;
+ if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
dest->total++;
dest->need_update = TRUE;
dest->unread++;
if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
dest->unreadmarked++;
+ if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
dest->total++;
dest->need_update = TRUE;
dest->unread++;
if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
dest->unreadmarked++;
+ if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
dest->total++;
dest->need_update = TRUE;
dest->unread++;
if (MSG_IS_UNREAD(newmsginfo->flags) && procmsg_msg_has_marked_parent(newmsginfo))
dest->unreadmarked++;
+ if (procmsg_msg_has_flagged_parent(newmsginfo, MSG_IGNORE_THREAD))
+ procmsg_msginfo_set_flags(newmsginfo, MSG_IGNORE_THREAD, 0);
dest->total++;
dest->need_update = TRUE;
g_free(destdir);
}
-gboolean procmsg_msg_has_marked_parent (MsgInfo *info)
+gboolean procmsg_msg_has_flagged_parent(MsgInfo *info, MsgPermFlags perm_flags)
{
MsgInfo *tmp;
+
g_return_val_if_fail(info != NULL, FALSE);
+
if (info != NULL && info->folder != NULL && info->inreplyto != NULL) {
tmp = folder_item_get_msginfo_by_msgid(info->folder, info->inreplyto);
- if (tmp && MSG_IS_MARKED(tmp->flags)) {
+ if (tmp && (tmp->flags.perm_flags & perm_flags)) {
procmsg_msginfo_free(tmp);
return TRUE;
} else if (tmp != NULL) {
- gboolean result = procmsg_msg_has_marked_parent(tmp);
+ gboolean result = procmsg_msg_has_flagged_parent(tmp, perm_flags);
procmsg_msginfo_free(tmp);
return result;
} else {
}
} else
return FALSE;
+}
+
+gboolean procmsg_msg_has_marked_parent(MsgInfo *info)
+{
+ return procmsg_msg_has_flagged_parent(info, MSG_MARKED);
}
GSList *procmsg_find_children (MsgInfo *info)