num = folder->copy_msg(folder, dest, msginfo);
- if (num != -1) {
+ if (num > 0) {
MsgInfo *newmsginfo;
/* Add new msginfo to dest folder */
msginfo->msgnum);
msgcache_remove_msg(msginfo->folder->cache, msginfo->msgnum);
- if (MSG_IS_NEW(msginfo->flags))
+ if (MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
msginfo->folder->new--;
- if (MSG_IS_UNREAD(msginfo->flags))
+ if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
msginfo->folder->unread--;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
msginfo->folder->unreadmarked--;
num = GPOINTER_TO_INT(l2->data);
- if (num != -1) {
+ if (num > 0) {
MsgInfo *newmsginfo;
newmsginfo = folder->get_msginfo(folder, dest, num);
num = GPOINTER_TO_INT(l2->data);
- if (num != -1) {
+ if (num > 0) {
item->folder->remove_msg(item->folder,
msginfo->folder,
msginfo->msgnum);
folder_item_read_cache(item);
msgcache_remove_msg(item->cache, msginfo->msgnum);
- if (MSG_IS_NEW(msginfo->flags))
+ if (MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
msginfo->folder->new--;
- if (MSG_IS_UNREAD(msginfo->flags))
+ if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
msginfo->folder->unread--;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
msginfo->folder->unreadmarked--;
if (!dest->cache) folder_item_read_cache(dest);
num = folder->copy_msg(folder, dest, msginfo);
- if (num != -1) {
+ if (num > 0) {
MsgInfo *newmsginfo;
if (NULL != (newmsginfo = folder->get_msginfo(folder, dest, num))) {
num = GPOINTER_TO_INT(l2->data);
- if (num != -1) {
+ if (num > 0) {
MsgInfo *newmsginfo;
newmsginfo = folder->get_msginfo(folder, dest, num);
msginfo = msgcache_get_msg(item->cache, num);
if (msginfo != NULL) {
- if (MSG_IS_NEW(msginfo->flags))
+ if (MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
item->new--;
- if (MSG_IS_UNREAD(msginfo->flags))
+ if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
item->unread--;
if (MSG_IS_UNREAD(msginfo->flags) && procmsg_msg_has_marked_parent(msginfo))
item->unreadmarked--;