Skip to content

Conversation

@JulianAdams4
Copy link
Contributor

No description provided.

labelId
});

export const updateStatusThread = (threadId, newStatus) => ({
Copy link
Contributor

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

if (date) params.date = date;
if (typeof unread === 'boolean') params.unread = unread;
if (typeof isMuted === 'boolean') params.isMuted = isMuted;
if (status) params.status = status;
Copy link
Contributor

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.

postOpenEvent(params) {
return client.postOpenEvent(params);
postOpenEvent(metadataKeys) {
return client.postOpenEvent({ metadataKeys });
Copy link
Contributor

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.

Copy link
Contributor

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) {
Copy link
Contributor

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;
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right!

@erikaperugachi erikaperugachi merged commit 39f6c23 into Criptext:master Jul 2, 2018
@JulianAdams4 JulianAdams4 deleted the fixes-0.5 branch July 3, 2018 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants