1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-12 12:35:04 -05:00

If we're doing a folder-involved search and an account has no folders

that match the folder criteria, don't search in the account.
This commit is contained in:
Daniel Applebaum 2010-04-25 17:52:59 +00:00
parent d7f18c7e35
commit c01adf3246

View File

@ -722,8 +722,8 @@ public class MessagingController implements Runnable
if (K9.DEBUG) if (K9.DEBUG)
{ {
Log.i(K9.LOG_TAG, "searchLocalMessages (" Log.i(K9.LOG_TAG, "searchLocalMessages ("
+ "accounts=" + Utility.combine(accountUuids, ',') + "accountUuids=" + Utility.combine(accountUuids, ',')
+ ", folders = " + Utility.combine(folderNames, ',') + ", folderNames = " + Utility.combine(folderNames, ',')
+ ", messages.size() = " + (messages != null ? messages.length : null) + ", messages.size() = " + (messages != null ? messages.length : null)
+ ", query = " + query + ", query = " + query
+ ", integrate = " + integrate + ", integrate = " + integrate
@ -837,6 +837,10 @@ public class MessagingController implements Runnable
tmpFoldersToSearch.add(localFolder); tmpFoldersToSearch.add(localFolder);
} }
} }
if (tmpFoldersToSearch.size() < 1)
{
continue;
}
foldersToSearch = tmpFoldersToSearch; foldersToSearch = tmpFoldersToSearch;
} }
catch (MessagingException me) catch (MessagingException me)