Display '(edited)' next to edited polls (#7789)

This commit is contained in:
Andy Balaam 2022-02-15 08:52:51 +00:00 committed by GitHub
parent 6793ef33ba
commit 84e15fa148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 95 additions and 13 deletions

View file

@ -400,8 +400,14 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
totalText = _t("Based on %(count)s votes", { count: totalVotes });
}
const editedSpan = (
this.props.mxEvent.replacingEvent()
? <span className="mx_MPollBody_edited"> ({ _t("edited") })</span>
: null
);
return <div className="mx_MPollBody">
<h2>{ poll.question.text }</h2>
<h2>{ poll.question.text }{ editedSpan }</h2>
<div className="mx_MPollBody_allOptions">
{
poll.answers.map((answer: PollAnswerSubevent) => {