fix(polls) Update limits (#11748)

pull/11749/head jitsi-meet_7469
Mihaela Dumitru 2 years ago committed by GitHub
parent d5146aaf2e
commit 7b538fc3e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      react/features/polls/components/native/PollCreate.js
  2. 3
      react/features/polls/components/web/PollCreate.js
  3. 3
      react/features/polls/constants.js

@ -7,7 +7,7 @@ import { Button } from 'react-native-paper';
import { Icon, IconClose } from '../../../base/icons';
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import { BUTTON_MODES } from '../../../chat/constants';
import { CHAR_LIMIT } from '../../constants';
import { ANSWERS_LIMIT, CHAR_LIMIT } from '../../constants';
import AbstractPollCreate from '../AbstractPollCreate';
import type { AbstractProps } from '../AbstractPollCreate';
@ -151,6 +151,7 @@ const PollCreate = (props: AbstractProps) => {
<View style = { chatStyles.pollCreateButtonsContainer }>
<Button
color = { BaseTheme.palette.action02 }
disabled = { answers.length >= ANSWERS_LIMIT }
mode = { BUTTON_MODES.CONTAINED }
onPress = { () => {
// adding and answer

@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { Icon, IconMenu } from '../../../base/icons';
import { Tooltip } from '../../../base/tooltip';
import { CHAR_LIMIT } from '../../constants';
import { ANSWERS_LIMIT, CHAR_LIMIT } from '../../constants';
import AbstractPollCreate from '../AbstractPollCreate';
import type { AbstractProps } from '../AbstractPollCreate';
@ -237,6 +237,7 @@ const PollCreate = (props: AbstractProps) => {
<button
aria-label = { 'Add option' }
className = 'poll-button poll-button-secondary'
disabled = { answers.length >= ANSWERS_LIMIT }
onClick = { () => {
addAnswer();
requestFocus(answers.length);

@ -4,4 +4,5 @@ export const COMMAND_NEW_POLL = 'new-poll';
export const COMMAND_ANSWER_POLL = 'answer-poll';
export const COMMAND_OLD_POLLS = 'old-polls';
export const CHAR_LIMIT = 1000;
export const CHAR_LIMIT = 500;
export const ANSWERS_LIMIT = 255;

Loading…
Cancel
Save