From f3caf0b561ddefeeab10891425802fadbf6ed1db Mon Sep 17 00:00:00 2001 From: Mark Hahnenberg Date: Tue, 3 Jan 2017 15:08:23 -0800 Subject: [PATCH] [thread-search] Fix archiving from search perspective Summary: We weren't removing the inbox category in the search perspective, so things weren't actually being archived. Test Plan: Run locally Reviewers: juan, evan Reviewed By: evan Maniphest Tasks: T7389 Differential Revision: https://phab.nylas.com/D3575 --- .../thread-search/lib/search-mailbox-perspective.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal_packages/thread-search/lib/search-mailbox-perspective.es6 b/internal_packages/thread-search/lib/search-mailbox-perspective.es6 index 0de3b40e1..c55e19152 100644 --- a/internal_packages/thread-search/lib/search-mailbox-perspective.es6 +++ b/internal_packages/thread-search/lib/search-mailbox-perspective.es6 @@ -1,8 +1,7 @@ import _ from 'underscore' -import {AccountStore, TaskFactory, MailboxPerspective} from 'nylas-exports' +import {AccountStore, CategoryStore, TaskFactory, MailboxPerspective} from 'nylas-exports' import SearchQuerySubscription from './search-query-subscription' - class SearchMailboxPerspective extends MailboxPerspective { constructor(accountIds, searchQuery) { @@ -38,6 +37,9 @@ class SearchMailboxPerspective extends MailboxPerspective { const account = AccountStore.accountForId(accountId) return [account.defaultFinishedCategory()] }, + categoriesToRemove: (accountId) => { + return [CategoryStore.getInboxCategory(accountId)] + }, }) } }