Poll: Support multiline questions (#1499)

This commit is contained in:
Alexander Zinchuk 2021-10-14 15:13:41 +03:00
parent 74ad2b263c
commit bfeb03514c
2 changed files with 3 additions and 2 deletions

View File

@ -260,7 +260,7 @@ const Poll: FC<OwnProps & StateProps & DispatchProps> = ({
return (
<div className="Poll" dir={lang.isRtl ? 'auto' : 'ltr'}>
{renderSolution()}
<div className="poll-question">{renderText(summary.question)}</div>
<div className="poll-question">{renderText(summary.question, ['emoji', 'br'])}</div>
<div className="poll-type">
{lang(getPollTypeString(summary))}
{renderRecentVoters()}

View File

@ -5,6 +5,7 @@ import { ApiMessage, ApiChat } from '../../api/types';
import { selectChat, selectChatMessage } from '../../modules/selectors';
import { buildCollectionByKey } from '../../util/iteratees';
import { getMessagePoll } from '../../modules/helpers';
import renderText from '../common/helpers/renderText';
import useLang from '../../hooks/useLang';
import useHistoryBack from '../../hooks/useHistoryBack';
@ -47,7 +48,7 @@ const PollResults: FC<OwnProps & StateProps> = ({
return (
<div className="PollResults" dir={lang.isRtl ? 'rtl' : undefined}>
<h3 className="poll-question" dir="auto">{summary.question}</h3>
<h3 className="poll-question" dir="auto">{renderText(summary.question, ['emoji', 'br'])}</h3>
<div className="poll-results-list custom-scroll">
{lastSyncTime && summary.answers.map((answer) => (
<PollAnswerResults