Skip to content

Commit

Permalink
Merge pull request #100 from ulu-telegram/master
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
ulugmer authored Nov 17, 2023
2 parents 7d45b4c + dd7fbaf commit f6d9837
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 33 deletions.
7 changes: 6 additions & 1 deletion src/components/left/main/ForumPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import captureEscKeyListener from '../../../util/captureEscKeyListener';
import { captureEvents, SwipeDirection } from '../../../util/captureEvents';
import { waitForTransitionEnd } from '../../../util/cssAnimationEndListeners';
import { createLocationHash } from '../../../util/routing';
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
import {
IS_ELECTRON, IS_MAC_OS, IS_TOUCH_ENV,
} from '../../../util/windowEnvironment';

import useAppLayout from '../../../hooks/useAppLayout';
import { dispatchHeavyAnimationEvent } from '../../../hooks/useHeavyAnimationCheck';
Expand Down Expand Up @@ -216,6 +218,9 @@ const ForumPanel: FC<OwnProps & StateProps> = ({
)}
onTransitionEnd={!isOpen ? onCloseAnimationEnd : undefined}
>
{IS_ELECTRON && IS_MAC_OS && (
<div className="electron-top-block" />
)}
<div id="TopicListHeader" className="left-header">
<Button
round
Expand Down
64 changes: 32 additions & 32 deletions src/components/left/main/LeftMainHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,15 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({

const MainButton: FC<{ onTrigger: () => void }> = useMemo(() => {
return ({ onTrigger }) => (
<UluHeaderProfile
<>
{IS_ELECTRON && (
<div className="electron-top-block" />
)}
<UluHeaderProfile
// eslint-disable-next-line react/jsx-no-bind
onClick={hasMenu ? onTrigger : () => onReset()}
/>
onClick={hasMenu ? onTrigger : () => onReset()}
/>
</>
);
}, [hasMenu, onReset]);

Expand Down Expand Up @@ -293,35 +298,30 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
{isCurrentUserPremium && <StatusButton />}
</>
) : (
<>
{IS_ELECTRON && (
<div className="electron-top-block" />
)}
<div className={styles.profileWrapper}>
<DropdownMenu
trigger={MainButton}
footer={`${APP_NAME} ${versionString}`}
className={buildClassName(
'main-menu',
lang.isRtl && 'rtl',
shouldHideSearch && lang.isRtl && 'right-aligned',
shouldDisableDropdownMenuTransitionRef.current && lang.isRtl && 'disable-transition',
)}
forceOpen={isBotMenuOpen}
positionX={shouldHideSearch && lang.isRtl ? 'right' : 'left'}
onTransitionEnd={lang.isRtl ? handleDropdownMenuTransitionEnd : undefined}
>
<LeftSideMenuItems
onSelectArchived={onSelectArchived}
onSelectContacts={onSelectContacts}
onSelectSettings={onSelectSettings}
onBotMenuOpened={markBotMenuOpen}
onBotMenuClosed={unmarkBotMenuOpen}
/>
</DropdownMenu>
<UluSearchButton onClick={handleSearchFocus} />
</div>
</>
<div className={styles.profileWrapper}>
<DropdownMenu
trigger={MainButton}
footer={`${APP_NAME} ${versionString}`}
className={buildClassName(
'main-menu',
lang.isRtl && 'rtl',
shouldHideSearch && lang.isRtl && 'right-aligned',
shouldDisableDropdownMenuTransitionRef.current && lang.isRtl && 'disable-transition',
)}
forceOpen={isBotMenuOpen}
positionX={shouldHideSearch && lang.isRtl ? 'right' : 'left'}
onTransitionEnd={lang.isRtl ? handleDropdownMenuTransitionEnd : undefined}
>
<LeftSideMenuItems
onSelectArchived={onSelectArchived}
onSelectContacts={onSelectContacts}
onSelectSettings={onSelectSettings}
onBotMenuOpened={markBotMenuOpen}
onBotMenuClosed={unmarkBotMenuOpen}
/>
</DropdownMenu>
<UluSearchButton onClick={handleSearchFocus} />
</div>
) }
{hasPasscode && (
<Button
Expand Down

0 comments on commit f6d9837

Please sign in to comment.