Skip to content

Commit 1d0f879

Browse files
authored
Merge pull request #220 from u9520107/rcint-4310
Use lastMatchedCorrespondentEntity in MessageItem and ConversationPanel
2 parents 7b2e245 + a2b9efa commit 1d0f879

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"react-router": "^3.0.0",
3232
"ringcentral": "3.0.0",
3333
"ringcentral-client": "^1.0.0-rc1",
34-
"ringcentral-integration": "^0.6.6",
34+
"ringcentral-integration": "^0.6.14",
3535
"whatwg-fetch": "^2.0.1"
3636
},
3737
"devDependencies": {
@@ -78,7 +78,7 @@
7878
"redux-thunk": "^2.1.0",
7979
"ringcentral": "3.0.0",
8080
"ringcentral-client": "^1.0.0-rc1",
81-
"ringcentral-integration": "^0.6.10",
81+
"ringcentral-integration": "^0.6.14",
8282
"sass-loader": "^4.1.1",
8383
"source-map-loader": "^0.1.5",
8484
"style-loader": "^0.13.1",

src/components/ConversationPanel/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ class ConversationPanel extends Component {
8787
getInitialContactIndex(nextProps = this.props) {
8888
const {
8989
correspondentMatches,
90-
conversationMatches,
90+
lastMatchedCorrespondentEntity,
9191
} = nextProps.conversation;
92-
for (const conversation of conversationMatches) {
92+
if (lastMatchedCorrespondentEntity) {
9393
const index = correspondentMatches.findIndex(contact => (
94-
this.props.isLoggedContact(nextProps.conversation, conversation, contact)
94+
contact.id === lastMatchedCorrespondentEntity.id
9595
));
9696
if (index > -1) return index;
9797
}

src/components/MessageItem/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export default class MessageItem extends Component {
7474
getInitialContactIndex(nextProps = this.props) {
7575
const {
7676
correspondentMatches,
77-
conversationMatches,
77+
lastMatchedCorrespondentEntity,
7878
} = nextProps.conversation;
79-
for (const conversation of conversationMatches) {
79+
if (lastMatchedCorrespondentEntity) {
8080
const index = correspondentMatches.findIndex(contact => (
81-
this.props.isLoggedContact(nextProps.conversation, conversation, contact)
81+
contact.id === lastMatchedCorrespondentEntity.id
8282
));
8383
if (index > -1) return index;
8484
}

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6432,9 +6432,9 @@ ringcentral-client@^1.0.0-rc1:
64326432
form-data "^2.1.2"
64336433
isomorphic-fetch "^2.2.1"
64346434

6435-
ringcentral-integration@^0.6.10:
6436-
version "0.6.10"
6437-
resolved "https://registry.yarnpkg.com/ringcentral-integration/-/ringcentral-integration-0.6.10.tgz#9c6d2eb008ba30c8a87743a559456790d0454a5a"
6435+
ringcentral-integration@^0.6.14:
6436+
version "0.6.14"
6437+
resolved "https://registry.yarnpkg.com/ringcentral-integration/-/ringcentral-integration-0.6.14.tgz#e05df2891e4c0729690eb5d7eee0cdb5953a9031"
64386438
dependencies:
64396439
file-loader "^0.10.1"
64406440
json-mask "^0.3.8"

0 commit comments

Comments
 (0)