mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +08:00
fix(snooze): look at allCategories instead of userCategories
This commit is contained in:
parent
f083818c92
commit
829facd6dc
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue