add submenu rtl support (disabled for now)

pull/1319/head
Audric Ackermann 5 years ago
parent c9d1b82004
commit 73e2250ca8
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -234,8 +234,13 @@ export function getDisappearingMenuItem(
Boolean(isBlocked) Boolean(isBlocked)
) )
) { ) {
const isRtlMode = isRtlBody();
return ( return (
<SubMenu title={i18n('disappearingMessages') as any}> // Remove the && false to make context menu work with RTL support
<SubMenu
title={i18n('disappearingMessages') as any}
rtl={isRtlMode && false}
>
{(timerOptions || []).map(item => ( {(timerOptions || []).map(item => (
<MenuItem <MenuItem
key={item.value} key={item.value}
@ -252,6 +257,10 @@ export function getDisappearingMenuItem(
return null; return null;
} }
export function isRtlBody(): boolean {
return ($('body') as any).hasClass('rtl');
}
export function getShowMemberMenuItem( export function getShowMemberMenuItem(
isPublic: boolean | undefined, isPublic: boolean | undefined,
isRss: boolean | undefined, isRss: boolean | undefined,

Loading…
Cancel
Save