-
Notifications
You must be signed in to change notification settings - Fork 23
Sent open event #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sent open event #258
Conversation
email_mailbox/src/actions/threads.js
Outdated
| labelId | ||
| }); | ||
|
|
||
| export const updateStatusThread = (threadId, newStatus) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status instead of newStatus, check othres reducer, we send params with the same name that we will update it
electron_app/src/DBManager.js
Outdated
| if (date) params.date = date; | ||
| if (typeof unread === 'boolean') params.unread = unread; | ||
| if (typeof isMuted === 'boolean') params.isMuted = isMuted; | ||
| if (status) params.status = status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember when you added that function that stripped the falsy values from an object? Why not use that instead of modifying this function everytime you need to update a new field.
electron_app/src/clientManager.js
Outdated
| postOpenEvent(params) { | ||
| return client.postOpenEvent(params); | ||
| postOpenEvent(metadataKeys) { | ||
| return client.postOpenEvent({ metadataKeys }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually work? I thought ClientAPI.postOpenEvent takes an array as input, not an object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was updated in a new version of ClientAPI, first version takes an object
| } | ||
| case Thread.UPDATE_STATUS: { | ||
| const { status, threadId } = action; | ||
| if (!threadId || !status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would these values be falsy? You should test this action.
| return thread(threadItem, action); | ||
| } | ||
| return thread; | ||
| return threadItem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer iterate with singular name: thread and so, you will return thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread is the function for a item in thread list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right!
No description provided.