SVN commit 1190354 by amantia: Cleanup code, both branches of the "if" do the same. M +2 -10 filtermanager.cpp --- trunk/KDE/kdepim/mailcommon/filtermanager.cpp #1190353:1190354 @@ -182,7 +182,6 @@ return 1; } bool stopIt = false; - bool atLeastOneRuleMatched = false; if ( !beginFiltering( item ) ) return 1; @@ -198,8 +197,6 @@ // filter is applicable if ( isMatching( item, (*it) ) ) { - // filter matches - atLeastOneRuleMatched = true; // execute actions: if ( (*it)->execActions(item, stopIt) == MailFilter::CriticalError ) { return 2; @@ -209,14 +206,9 @@ } Akonadi::Collection targetFolder = MessageProperty::filterFolder( item ); - /* endFilter does a take() and addButKeepUID() to ensure the changed - * message is on disk. This is unnessecary if nothing matched, so just - * reset state and don't update the listview at all. */ - if ( atLeastOneRuleMatched ) { + endFiltering( item ); - } else { - MessageProperty::setFiltering( item, false ); - } + if ( targetFolder.isValid() ) { new Akonadi::ItemMoveJob( item, targetFolder, this ); // TODO: check result return 0;