mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-19 14:40:26 +08:00
Fix missing “new” keyword - weird…
This commit is contained in:
parent
a15278261f
commit
96eea95903
3 changed files with 9 additions and 10 deletions
|
@ -290,7 +290,7 @@ class ThreadList extends React.Component
|
|||
return unless NylasEnv.config.get('core.workspace.showImportant')
|
||||
|
||||
Actions.queueTasks(TaskFactory.tasksForThreadsByAccountId(threads, (accountThreads, accountId) =>
|
||||
return ChangeLabelsTask({
|
||||
return new ChangeLabelsTask({
|
||||
threads: accountThreads,
|
||||
source: "Keyboard Shortcut"
|
||||
labelsToAdd: if important then [CategoryStore.getCategoryByRole(accountId, 'important')] else []
|
||||
|
|
|
@ -59,7 +59,7 @@ class SearchMailboxPerspective extends MailboxPerspective {
|
|||
const dest = account.preferredRemovalDestination();
|
||||
|
||||
if (dest instanceof Folder) {
|
||||
return ChangeFolderTask({
|
||||
return new ChangeFolderTask({
|
||||
threads: accountThreads,
|
||||
source: "Dragged out of list",
|
||||
folder: dest,
|
||||
|
@ -67,7 +67,7 @@ class SearchMailboxPerspective extends MailboxPerspective {
|
|||
}
|
||||
if (dest.role === 'all') {
|
||||
// if you're searching and archive something, it really just removes the inbox label
|
||||
return ChangeLabelsTask({
|
||||
return new ChangeLabelsTask({
|
||||
threads: accountThreads,
|
||||
source: "Dragged out of list",
|
||||
labelsToRemove: [CategoryStore.getInboxCategory(accountId)],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import moment from 'moment';
|
||||
import _ from 'underscore';
|
||||
import {
|
||||
Actions,
|
||||
Thread,
|
||||
|
@ -79,7 +78,7 @@ const SnoozeUtils = {
|
|||
const snoozeCat = getSnoozeCategory(accountId);
|
||||
const inboxCat = getInboxCategory(accountId);
|
||||
if (snoozeCat instanceof Label) {
|
||||
return ChangeLabelsTask({
|
||||
return new ChangeLabelsTask({
|
||||
source: "Snooze Move",
|
||||
threads: accountThreads,
|
||||
taskDescription: description,
|
||||
|
@ -87,7 +86,7 @@ const SnoozeUtils = {
|
|||
labelsToRemove: snooze ? [inboxCat] : [snoozeCat],
|
||||
});
|
||||
}
|
||||
return ChangeFolderTask({
|
||||
return new ChangeFolderTask({
|
||||
source: "Snooze Move",
|
||||
threads: accountThreads,
|
||||
taskDescription: description,
|
||||
|
@ -108,8 +107,8 @@ const SnoozeUtils = {
|
|||
moveThreadsToSnooze(threads, snoozeCategoriesByAccountPromise, snoozeDate) {
|
||||
return snoozeCategoriesByAccountPromise
|
||||
.then((snoozeCategoriesByAccountId) => {
|
||||
const getSnoozeCategory = (accId) => [snoozeCategoriesByAccountId[accId]]
|
||||
const getInboxCategory = (accId) => [CategoryStore.getInboxCategory(accId)]
|
||||
const getSnoozeCategory = (accId) => snoozeCategoriesByAccountId[accId]
|
||||
const getInboxCategory = (accId) => CategoryStore.getInboxCategory(accId)
|
||||
const description = SnoozeUtils.snoozedUntilMessage(snoozeDate)
|
||||
return SnoozeUtils.moveThreads(
|
||||
threads,
|
||||
|
@ -121,8 +120,8 @@ const SnoozeUtils = {
|
|||
moveThreadsFromSnooze(threads, snoozeCategoriesByAccountPromise) {
|
||||
return snoozeCategoriesByAccountPromise
|
||||
.then((snoozeCategoriesByAccountId) => {
|
||||
const getSnoozeCategory = (accId) => [snoozeCategoriesByAccountId[accId]]
|
||||
const getInboxCategory = (accId) => [CategoryStore.getInboxCategory(accId)]
|
||||
const getSnoozeCategory = (accId) => snoozeCategoriesByAccountId[accId]
|
||||
const getInboxCategory = (accId) => CategoryStore.getInboxCategory(accId)
|
||||
const description = 'Unsnoozed';
|
||||
return SnoozeUtils.moveThreads(
|
||||
threads,
|
||||
|
|
Loading…
Reference in a new issue