Add warning to Upload Confirm prompt if replying, as can't reply with file

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-04-04 11:19:13 +01:00
parent 1d90835de0
commit 9df2f7ddc8
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 9 additions and 0 deletions

View File

@ -111,6 +111,14 @@ export default class MessageComposer extends React.Component {
</li>); </li>);
} }
const isQuoting = Boolean(RoomViewStore.getQuotingEvent());
let replyToWarning = null;
if (isQuoting) {
replyToWarning = <p>{
_t('At this time it is not possible to reply with a file so this will be sent without being a reply.')
}</p>;
}
Modal.createTrackedDialog('Upload Files confirmation', '', QuestionDialog, { Modal.createTrackedDialog('Upload Files confirmation', '', QuestionDialog, {
title: _t('Upload Files'), title: _t('Upload Files'),
description: ( description: (
@ -119,6 +127,7 @@ export default class MessageComposer extends React.Component {
<ul style={{listStyle: 'none', textAlign: 'left'}}> <ul style={{listStyle: 'none', textAlign: 'left'}}>
{ fileList } { fileList }
</ul> </ul>
{ replyToWarning }
</div> </div>
), ),
onFinished: (shouldUpload) => { onFinished: (shouldUpload) => {