use null vars for context menu lists
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>pull/21833/head
parent
086042f078
commit
e685f1239d
|
@ -257,7 +257,7 @@ export default class MessageContextMenu extends React.Component {
|
||||||
let externalURLButton;
|
let externalURLButton;
|
||||||
let quoteButton;
|
let quoteButton;
|
||||||
let collapseReplyThread;
|
let collapseReplyThread;
|
||||||
const optionLists = [];
|
let redactItemList;
|
||||||
|
|
||||||
// status is SENT before remote-echo, null after
|
// status is SENT before remote-echo, null after
|
||||||
const isSent = !eventStatus || eventStatus === EventStatus.SENT;
|
const isSent = !eventStatus || eventStatus === EventStatus.SENT;
|
||||||
|
@ -388,7 +388,7 @@ export default class MessageContextMenu extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
optionLists.push((
|
const commonItemsList = (
|
||||||
<IconizedContextMenuOptionList key={'group1'}>
|
<IconizedContextMenuOptionList key={'group1'}>
|
||||||
{ quoteButton }
|
{ quoteButton }
|
||||||
{ forwardButton }
|
{ forwardButton }
|
||||||
|
@ -401,14 +401,14 @@ export default class MessageContextMenu extends React.Component {
|
||||||
{ resendReactionsButton }
|
{ resendReactionsButton }
|
||||||
{ collapseReplyThread }
|
{ collapseReplyThread }
|
||||||
</IconizedContextMenuOptionList>
|
</IconizedContextMenuOptionList>
|
||||||
));
|
);
|
||||||
|
|
||||||
if (redactButton) {
|
if (redactButton) {
|
||||||
optionLists.push((
|
redactItemList = (
|
||||||
<IconizedContextMenuOptionList key={'group2'} red>
|
<IconizedContextMenuOptionList key={'group2'} red>
|
||||||
{ redactButton }
|
{ redactButton }
|
||||||
</IconizedContextMenuOptionList>
|
</IconizedContextMenuOptionList>
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -417,7 +417,8 @@ export default class MessageContextMenu extends React.Component {
|
||||||
className="mx_MessageContextMenu"
|
className="mx_MessageContextMenu"
|
||||||
compact={true}
|
compact={true}
|
||||||
>
|
>
|
||||||
{ optionLists }
|
{ commonItemsList }
|
||||||
|
{ redactItemList }
|
||||||
</IconizedContextMenu>
|
</IconizedContextMenu>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue