mirror of https://github.com/vector-im/riot-web
Move to a fragment
parent
29aeea2974
commit
994d8708f2
|
@ -315,14 +315,13 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
const isAlphabetical = RoomListStore.instance.getTagSorting(this.props.tagId) === SortAlgorithm.Alphabetic;
|
const isAlphabetical = RoomListStore.instance.getTagSorting(this.props.tagId) === SortAlgorithm.Alphabetic;
|
||||||
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
|
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
|
||||||
|
|
||||||
// Invites don't get some nonsense options, so only add them if we have to. We do
|
// Invites don't get some nonsense options, so only add them if we have to.
|
||||||
// this with an array instead of a containing div to ensure that the DOM structure
|
let otherSections = null;
|
||||||
// is relatively sane.
|
|
||||||
let otherSections = [];
|
|
||||||
if (this.props.tagId !== DefaultTagID.Invite) {
|
if (this.props.tagId !== DefaultTagID.Invite) {
|
||||||
otherSections.push(<hr key={otherSections.length} />);
|
otherSections = (
|
||||||
otherSections.push(
|
<React.Fragment>
|
||||||
<div key={otherSections.length}>
|
<hr />
|
||||||
|
<div>
|
||||||
<div className='mx_RoomSublist2_contextMenu_title'>{_t("Unread rooms")}</div>
|
<div className='mx_RoomSublist2_contextMenu_title'>{_t("Unread rooms")}</div>
|
||||||
<StyledCheckbox
|
<StyledCheckbox
|
||||||
onChange={this.onUnreadFirstChanged}
|
onChange={this.onUnreadFirstChanged}
|
||||||
|
@ -330,11 +329,9 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
>
|
>
|
||||||
{_t("Always show first")}
|
{_t("Always show first")}
|
||||||
</StyledCheckbox>
|
</StyledCheckbox>
|
||||||
</div>,
|
</div>
|
||||||
);
|
<hr />
|
||||||
otherSections.push(<hr key={otherSections.length} />);
|
<div>
|
||||||
otherSections.push(
|
|
||||||
<div key={otherSections.length}>
|
|
||||||
<div className='mx_RoomSublist2_contextMenu_title'>{_t("Show")}</div>
|
<div className='mx_RoomSublist2_contextMenu_title'>{_t("Show")}</div>
|
||||||
<StyledCheckbox
|
<StyledCheckbox
|
||||||
onChange={this.onMessagePreviewChanged}
|
onChange={this.onMessagePreviewChanged}
|
||||||
|
@ -342,7 +339,8 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
||||||
>
|
>
|
||||||
{_t("Message preview")}
|
{_t("Message preview")}
|
||||||
</StyledCheckbox>
|
</StyledCheckbox>
|
||||||
</div>,
|
</div>
|
||||||
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue