Do not display call buttons for SMS-only convo
This commit is contained in:
parent
07a0a6da22
commit
d8417e562b
3 changed files with 18 additions and 2 deletions
|
@ -188,6 +188,19 @@ const stories: Array<ConversationHeaderStory> = [
|
|||
muteExpiresAt: new Date('3000-10-18T11:11:11Z').valueOf(),
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'SMS-only conversation',
|
||||
props: {
|
||||
...commonProps,
|
||||
color: 'ultramarine',
|
||||
title: '(202) 555-0006',
|
||||
phoneNumber: '(202) 555-0006',
|
||||
type: 'direct',
|
||||
id: '6',
|
||||
acceptedMessageRequest: true,
|
||||
isSMSOnly: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@ export type PropsDataType = {
|
|||
isMissingMandatoryProfileSharing?: boolean;
|
||||
outgoingCallButtonStyle: OutgoingCallButtonStyle;
|
||||
showBackButton?: boolean;
|
||||
isSMSOnly?: boolean;
|
||||
} & Pick<
|
||||
ConversationType,
|
||||
| 'acceptedMessageRequest'
|
||||
|
@ -570,7 +571,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
}
|
||||
|
||||
public render(): ReactNode {
|
||||
const { id } = this.props;
|
||||
const { id, isSMSOnly } = this.props;
|
||||
const { isNarrow } = this.state;
|
||||
const triggerId = `conversation-${id}`;
|
||||
|
||||
|
@ -593,7 +594,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
|||
>
|
||||
{this.renderBackButton()}
|
||||
{this.renderHeader()}
|
||||
{this.renderOutgoingCallButtons()}
|
||||
{!isSMSOnly && this.renderOutgoingCallButtons()}
|
||||
{this.renderSearchButton()}
|
||||
{this.renderMoreButton(triggerId)}
|
||||
{this.renderMenu(triggerId)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue