Skip to content

Conversation

@jarvislin94
Copy link
Contributor

No description provided.

name: lastCall.to.phoneNumber,
name: null,
status: lastCall.webphoneSession ? lastCall.webphoneSession.callStatus : null,
phoneNumber: lastCall.to.phoneNumber
Copy link
Contributor

Choose a reason for hiding this comment

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

for the sake of performance, plz make sure that one and only one shape is given to the value of the _lastCallInfo

status: lastCall.webphoneSession.callStatus,
};
} else if (lastCalleeType === calleeTypes.unknow) {
_lastCallInfo = {
Copy link
Contributor

Choose a reason for hiding this comment

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

switch...case
since the condition only change by the value of lastCalleeType

</div>
<div className={styles.callee_name}>
{
(lastCallInfo.calleeType === calleeTypes.conference)
Copy link
Contributor

Choose a reason for hiding this comment

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

(lastCallInfo.calleeType === calleeTypes.conference)
you have already did this as the isOnConferenCall

</div>
);

const currentCallTitle = nameMatches.length
Copy link
Contributor

Choose a reason for hiding this comment

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

what if nameMatches is not a array?

color: #303030;
float: left;
max-width: 43%;
max-width: 58%;
Copy link
Contributor

Choose a reason for hiding this comment

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

as long as we fix the width of the avatar and the call status, then we don't need this 58%, let flex layout to do the job

phoneNumber: lastCall.to.phoneNumber,
extraNum: 0,
};
}
Copy link
Contributor

Choose a reason for hiding this comment

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

return the value inside the case... directly, since this function is all about the_lastCallInfo

Copy link
Contributor

Choose a reason for hiding this comment

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

Omit it, since we need to update the mutable data _lastCallInfo

@huanhulan huanhulan merged commit 502e8a3 into ringcentral:master Jul 26, 2018
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.

2 participants