talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 013e2cf70d0ca5b44e8f0a5876e4680f818e0839
parent 1135c8b51920fe16b2b5d3ddd42c203a91df7c66
Author: Stephan Sachse <ste.sachse@gmail.com>
Date:   Sun, 26 Jul 2015 01:34:55 +0200

fix nntp filtering on incoming messages

this should fix bug #1920 and bug #2627

folder_item_scan_full() in folder.c at line 2343 applies filter only to
folder items of special type F_INBOX. but nntp folder items are of
special folder item type F_NORMAL and folder type F_NEWS. so i change
the condition for do_filter to also match nntp folders. works for me on
fedora 22 and claws-mail-3.11.1

Signed-off-by: Stephan Sachse <ste.sachse@gmail.com>
Signed-off-by: Andrej Kacian <ticho@claws-mail.org>

Diffstat:
Msrc/folder.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/folder.c b/src/folder.c @@ -2372,10 +2372,12 @@ gint folder_item_scan_full(FolderItem *item, gboolean filtering) if (newmsg_list != NULL) { GSList *elem, *to_filter = NULL; gboolean do_filter = (filtering == TRUE) && - (item->stype == F_INBOX) && - (item->folder->account != NULL) && - (item->folder->account->filter_on_recv); - + (item->folder->account != NULL) && + (item->folder->account->filter_on_recv) && + ((item->stype == F_INBOX) || + ((item->stype == F_NORMAL) && + (FOLDER_TYPE(item->folder) == F_NEWS))); + for (elem = newmsg_list; elem != NULL; elem = g_slist_next(elem)) { MsgInfo *msginfo = (MsgInfo *) elem->data;