Skip to content

Commit

Permalink
fix bugs related to messages (#206)
Browse files Browse the repository at this point in the history
* add contactSearch for clickToSMS;
fix active call color;
fix message scroll;
fix format phoneNumber as entityName

* bump version
  • Loading branch information
alvita authored May 19, 2017
1 parent 5302df0 commit d91b326
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions dev-server/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default function App({
locale={phone.locale}
callMonitor={phone.callMonitor}
contactMatcher={phone.contactMatcher}
contactSearch={phone.contactSearch}
regionSettings={phone.regionSettings}
connectivityMonitor={phone.connectivityMonitor}
rateLimiter={phone.rateLimiter}
Expand All @@ -158,6 +159,7 @@ export default function App({
locale={phone.locale}
callHistory={phone.callHistory}
contactMatcher={phone.contactMatcher}
contactSearch={phone.contactSearch}
regionSettings={phone.regionSettings}
connectivityMonitor={phone.connectivityMonitor}
rateLimiter={phone.rateLimiter}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"redux-thunk": "^2.1.0",
"ringcentral": "3.0.0",
"ringcentral-client": "^1.0.0-rc1",
"ringcentral-integration": "^0.6.6",
"ringcentral-integration": "^0.6.7",
"sass-loader": "^4.1.1",
"source-map-loader": "^0.1.5",
"style-loader": "^0.13.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/CallItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default class CallItem extends Component {
const phoneNumber = this.getPhoneNumber();
await this.props.onCreateContact({
phoneNumber,
name: this.props.enableContactFallback ? this.getFallbackContactName() : phoneNumber,
name: this.props.enableContactFallback ? this.getFallbackContactName() : '',
entityType,
});

Expand All @@ -188,7 +188,7 @@ export default class CallItem extends Component {
});
} else {
this.props.onClickToSms({
name: this.props.enableContactFallback ? this.getFallbackContactName() : phoneNumber,
name: this.props.enableContactFallback ? this.getFallbackContactName() : '',
phoneNumber,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CallItem/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
.active {
color: $active;
button {
color: $missed;
color: $active;
}
}
1 change: 0 additions & 1 deletion src/components/DropdownSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class DropdownSelect extends Component {
};
this.mounted = true;
this.toggleShowDropdown = (e) => {
console.debug('this.state.open', this.state.open);
if (!this.state.open) {
window.addEventListener('click', this._handleDocumentClick, false);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class MessageItem extends Component {
const phoneNumber = this.getPhoneNumber();
await this.props.onCreateContact({
phoneNumber,
name: this.props.enableContactFallback ? this.getFallbackContactName() : phoneNumber,
name: this.props.enableContactFallback ? this.getFallbackContactName() : '',
entityType,
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class MessageList extends Component {
ref={(list) => { this.messagesListBody = list; }}
>
{search}
<Panel className={styles.scroll}>
<Panel className={classnames(styles.content, styles.contentWithSearch)}>
{content}
</Panel>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/components/MessageList/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
.root {
@include full-size;
}
.scroll {
overflow-y: auto;
padding-bottom: 40px;
}

.content {
@include full-size;
overflow-y: auto;
Expand Down
2 changes: 2 additions & 0 deletions src/containers/CallHistoryPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function mapToFunctions(_, {
router,
dialerRoute = '/',
composeTextRoute = '/composeText',
contactSearch,
}) {
return {
dateTimeFormatter,
Expand Down Expand Up @@ -98,6 +99,7 @@ function mapToFunctions(_, {
if (contact.name && contact.phoneNumber &&
contact.name === contact.phoneNumber) {
composeText.updateTypingToNumber(contact.phoneNumber);
contactSearch.search({ searchString: contact.phoneNumber });
} else {
composeText.addToNumber(contact);
if (composeText.typingToNumber === contact.phoneNumber) {
Expand Down
2 changes: 2 additions & 0 deletions src/containers/CallMonitorPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function mapToFunctions(_, {
}),
callLogger,
contactMatcher,
contactSearch,
onLogCall,
isLoggedContact,
router,
Expand Down Expand Up @@ -92,6 +93,7 @@ function mapToFunctions(_, {
if (contact.name && contact.phoneNumber &&
contact.name === contact.phoneNumber) {
composeText.updateTypingToNumber(contact.phoneNumber);
contactSearch.search({ searchString: contact.phoneNumber });
} else {
composeText.addToNumber(contact);
if (composeText.typingToNumber === contact.phoneNumber) {
Expand Down

0 comments on commit d91b326

Please sign in to comment.