Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

functions.web.ts 789B

1234567891011121314151617181920212223242526
  1. import { IReduxState } from '../app/types';
  2. import { getToolbarButtons } from '../base/config/functions.web';
  3. import { shouldDisplayReactionsButtons } from './functions.any';
  4. export * from './functions.any';
  5. /**
  6. * Returns the visibility state of the reactions menu.
  7. *
  8. * @param {Object} state - The state of the application.
  9. * @returns {boolean}
  10. */
  11. export function getReactionsMenuVisibility(state: IReduxState): boolean {
  12. return state['features/reactions'].visible;
  13. }
  14. /**
  15. * Whether or not the reactions button is enabled.
  16. *
  17. * @param {Object} state - The Redux state object.
  18. * @returns {boolean}
  19. */
  20. export function isReactionsButtonEnabled(state: IReduxState) {
  21. return Boolean(getToolbarButtons(state).includes('reactions')) && shouldDisplayReactionsButtons(state);
  22. }