Do not display call buttons for SMS-only convo

This commit is contained in:
Fedor Indutny 2021-05-25 15:30:57 -07:00 committed by GitHub
parent 07a0a6da22
commit d8417e562b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View file

@ -18,6 +18,7 @@ import { getActiveCall, isAnybodyElseInGroupCall } from '../ducks/calling';
import { getUserConversationId, getIntl } from '../selectors/user';
import { getOwn } from '../../util/getOwn';
import { missingCaseError } from '../../util/missingCaseError';
import { isConversationSMSOnly } from '../../util/isConversationSMSOnly';
import { isGroupCallingEnabled } from '../../util/isGroupCallingEnabled';
export type OwnProps = {
@ -117,6 +118,7 @@ const mapStateToProps = (state: StateType, ownProps: OwnProps) => {
conversation.messageCount &&
conversation.messageCount > 0
),
isSMSOnly: isConversationSMSOnly(conversation),
i18n: getIntl(state),
showBackButton: state.conversations.selectedConversationPanelDepth > 0,
outgoingCallButtonStyle: getOutgoingCallButtonStyle(conversation, state),