fix(toolbar-buttons) Hide/show invite button based on toolbarButtons

This commit is contained in:
hmuresan 2021-08-31 11:24:47 +03:00 committed by Horatiu Muresan
parent eb4fff773b
commit 74026e743c
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import React, { useCallback, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
import { openDialog } from '../../../base/dialog'; import { openDialog } from '../../../base/dialog';
import { import {
getParticipantCountWithFake, getParticipantCountWithFake,
@ -160,7 +161,7 @@ function _mapStateToProps(state): Object {
// and we will not re-render on change, but if count changes we will do // and we will not re-render on change, but if count changes we will do
const participantsCount = getParticipantCountWithFake(state); const participantsCount = getParticipantCountWithFake(state);
const showInviteButton = shouldRenderInviteButton(state); const showInviteButton = shouldRenderInviteButton(state) && isToolbarButtonEnabled('invite', state);
return { return {
sortedParticipantIds, sortedParticipantIds,