mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-21 22:54:11 +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'
|
opts.iconName= 'snooze.png'
|
||||||
|
|
||||||
categories = accountIds.map (accId) =>
|
categories = accountIds.map (accId) =>
|
||||||
_.findWhere CategoryStore.userCategories(accId), {displayName}
|
_.findWhere CategoryStore.categories(accId), {displayName}
|
||||||
categories = _.compact(categories)
|
categories = _.compact(categories)
|
||||||
|
|
||||||
perspective = MailboxPerspective.forCategories(categories)
|
perspective = MailboxPerspective.forCategories(categories)
|
||||||
|
|
|
@ -53,8 +53,8 @@ export function whenCategoriesReady() {
|
||||||
export function getSnoozeCategory(accountId, categoryName = SNOOZE_CATEGORY_NAME) {
|
export function getSnoozeCategory(accountId, categoryName = SNOOZE_CATEGORY_NAME) {
|
||||||
return whenCategoriesReady()
|
return whenCategoriesReady()
|
||||||
.then(()=> {
|
.then(()=> {
|
||||||
const userCategories = CategoryStore.userCategories(accountId)
|
const allCategories = CategoryStore.categories(accountId)
|
||||||
const category = _.findWhere(userCategories, {displayName: categoryName})
|
const category = _.findWhere(allCategories, {displayName: categoryName})
|
||||||
if (category) {
|
if (category) {
|
||||||
return Promise.resolve(category);
|
return Promise.resolve(category);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue