Poll: Support multiline questions (#1499)
This commit is contained in:
parent
74ad2b263c
commit
bfeb03514c
@ -260,7 +260,7 @@ const Poll: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div className="Poll" dir={lang.isRtl ? 'auto' : 'ltr'}>
|
<div className="Poll" dir={lang.isRtl ? 'auto' : 'ltr'}>
|
||||||
{renderSolution()}
|
{renderSolution()}
|
||||||
<div className="poll-question">{renderText(summary.question)}</div>
|
<div className="poll-question">{renderText(summary.question, ['emoji', 'br'])}</div>
|
||||||
<div className="poll-type">
|
<div className="poll-type">
|
||||||
{lang(getPollTypeString(summary))}
|
{lang(getPollTypeString(summary))}
|
||||||
{renderRecentVoters()}
|
{renderRecentVoters()}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { ApiMessage, ApiChat } from '../../api/types';
|
|||||||
import { selectChat, selectChatMessage } from '../../modules/selectors';
|
import { selectChat, selectChatMessage } from '../../modules/selectors';
|
||||||
import { buildCollectionByKey } from '../../util/iteratees';
|
import { buildCollectionByKey } from '../../util/iteratees';
|
||||||
import { getMessagePoll } from '../../modules/helpers';
|
import { getMessagePoll } from '../../modules/helpers';
|
||||||
|
import renderText from '../common/helpers/renderText';
|
||||||
import useLang from '../../hooks/useLang';
|
import useLang from '../../hooks/useLang';
|
||||||
import useHistoryBack from '../../hooks/useHistoryBack';
|
import useHistoryBack from '../../hooks/useHistoryBack';
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ const PollResults: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="PollResults" dir={lang.isRtl ? 'rtl' : undefined}>
|
<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">
|
<div className="poll-results-list custom-scroll">
|
||||||
{lastSyncTime && summary.answers.map((answer) => (
|
{lastSyncTime && summary.answers.map((answer) => (
|
||||||
<PollAnswerResults
|
<PollAnswerResults
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user