fix(snooze): look at allCategories instead of userCategories

This commit is contained in:
Evan Morikawa 2016-02-24 16:51:19 -08:00
parent f083818c92
commit 829facd6dc
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ class SidebarItem
opts.iconName= 'snooze.png'
categories = accountIds.map (accId) =>
_.findWhere CategoryStore.userCategories(accId), {displayName}
_.findWhere CategoryStore.categories(accId), {displayName}
categories = _.compact(categories)
perspective = MailboxPerspective.forCategories(categories)

View file

@ -53,8 +53,8 @@ export function whenCategoriesReady() {
export function getSnoozeCategory(accountId, categoryName = SNOOZE_CATEGORY_NAME) {
return whenCategoriesReady()
.then(()=> {
const userCategories = CategoryStore.userCategories(accountId)
const category = _.findWhere(userCategories, {displayName: categoryName})
const allCategories = CategoryStore.categories(accountId)
const category = _.findWhere(allCategories, {displayName: categoryName})
if (category) {
return Promise.resolve(category);
}