Symbol Menu: Show scrollbar on non-touch devices
This commit is contained in:
parent
dd4ef5202d
commit
251aa22151
@ -6,8 +6,8 @@ import { withGlobal } from '../../../lib/teact/teactn';
|
|||||||
import { GlobalState } from '../../../global/types';
|
import { GlobalState } from '../../../global/types';
|
||||||
|
|
||||||
import { MENU_TRANSITION_DURATION } from '../../../config';
|
import { MENU_TRANSITION_DURATION } from '../../../config';
|
||||||
|
import { IS_SINGLE_COLUMN_LAYOUT, IS_TOUCH_ENV } from '../../../util/environment';
|
||||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||||
import { IS_SINGLE_COLUMN_LAYOUT } from '../../../util/environment';
|
|
||||||
import {
|
import {
|
||||||
EmojiModule,
|
EmojiModule,
|
||||||
EmojiRawData,
|
EmojiRawData,
|
||||||
@ -197,7 +197,10 @@ const EmojiPicker: FC<OwnProps & StateProps> = ({
|
|||||||
<div ref={headerRef} className="EmojiPicker-header" dir={lang.isRtl ? 'rtl' : ''}>
|
<div ref={headerRef} className="EmojiPicker-header" dir={lang.isRtl ? 'rtl' : ''}>
|
||||||
{allCategories.map(renderCategoryButton)}
|
{allCategories.map(renderCategoryButton)}
|
||||||
</div>
|
</div>
|
||||||
<div ref={containerRef} className="EmojiPicker-main no-selection no-scrollbar">
|
<div
|
||||||
|
ref={containerRef}
|
||||||
|
className={buildClassName('EmojiPicker-main no-selection', IS_TOUCH_ENV ? 'no-scrollbar' : 'custom-scroll')}
|
||||||
|
>
|
||||||
{allCategories.map((category, i) => (
|
{allCategories.map((category, i) => (
|
||||||
<EmojiCategory
|
<EmojiCategory
|
||||||
category={category}
|
category={category}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { GlobalActions } from '../../../global/types';
|
|||||||
import { ApiVideo } from '../../../api/types';
|
import { ApiVideo } from '../../../api/types';
|
||||||
|
|
||||||
import { SLIDE_TRANSITION_DURATION } from '../../../config';
|
import { SLIDE_TRANSITION_DURATION } from '../../../config';
|
||||||
|
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
import { pick } from '../../../util/iteratees';
|
import { pick } from '../../../util/iteratees';
|
||||||
import { useIntersectionObserver } from '../../../hooks/useIntersectionObserver';
|
import { useIntersectionObserver } from '../../../hooks/useIntersectionObserver';
|
||||||
@ -56,7 +57,10 @@ const GifPicker: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
const canRenderContents = useAsyncRendering([], SLIDE_TRANSITION_DURATION);
|
const canRenderContents = useAsyncRendering([], SLIDE_TRANSITION_DURATION);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef} className={buildClassName('GifPicker no-scrollbar', className)}>
|
<div
|
||||||
|
ref={containerRef}
|
||||||
|
className={buildClassName('GifPicker', className, IS_TOUCH_ENV ? 'no-scrollbar' : 'custom-scroll')}
|
||||||
|
>
|
||||||
{!canSendGifs ? (
|
{!canSendGifs ? (
|
||||||
<div className="picker-disabled">Sending GIFs is not allowed in this chat.</div>
|
<div className="picker-disabled">Sending GIFs is not allowed in this chat.</div>
|
||||||
) : canRenderContents && savedGifs && savedGifs.length ? (
|
) : canRenderContents && savedGifs && savedGifs.length ? (
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { ApiStickerSet, ApiSticker } from '../../../api/types';
|
|||||||
import { StickerSetOrRecent } from '../../../types';
|
import { StickerSetOrRecent } from '../../../types';
|
||||||
|
|
||||||
import { SLIDE_TRANSITION_DURATION, STICKER_SIZE_PICKER_HEADER } from '../../../config';
|
import { SLIDE_TRANSITION_DURATION, STICKER_SIZE_PICKER_HEADER } from '../../../config';
|
||||||
|
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||||
import fastSmoothScroll from '../../../util/fastSmoothScroll';
|
import fastSmoothScroll from '../../../util/fastSmoothScroll';
|
||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
@ -257,7 +258,10 @@ const StickerPicker: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
>
|
>
|
||||||
{allSets.map(renderCover)}
|
{allSets.map(renderCover)}
|
||||||
</div>
|
</div>
|
||||||
<div ref={containerRef} className="StickerPicker-main no-scrollbar">
|
<div
|
||||||
|
ref={containerRef}
|
||||||
|
className={buildClassName('StickerPicker-main no-selection', IS_TOUCH_ENV ? 'no-scrollbar' : 'custom-scroll')}
|
||||||
|
>
|
||||||
{allSets.map((stickerSet, i) => (
|
{allSets.map((stickerSet, i) => (
|
||||||
<StickerSet
|
<StickerSet
|
||||||
key={stickerSet.id}
|
key={stickerSet.id}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user