[Refactoring] Rename environment.ts → windowEnvironment.ts to avoid incorrect usage
This commit is contained in:
parent
967888cefc
commit
21678cfd51
@ -5,7 +5,7 @@ import { getActions, withGlobal } from './global';
|
||||
import type { GlobalState } from './global/types';
|
||||
import type { UiLoaderPage } from './components/common/UiLoader';
|
||||
|
||||
import { IS_INSTALL_PROMPT_SUPPORTED, IS_MULTITAB_SUPPORTED, PLATFORM_ENV } from './util/environment';
|
||||
import { IS_INSTALL_PROMPT_SUPPORTED, IS_MULTITAB_SUPPORTED, PLATFORM_ENV } from './util/windowEnvironment';
|
||||
import { INACTIVE_MARKER, PAGE_TITLE } from './config';
|
||||
import { selectTabState } from './global/selectors';
|
||||
import { updateSizes } from './util/windowSize';
|
||||
|
||||
@ -5,7 +5,7 @@ import type { WorkerMessageEvent, OriginRequest, ThenArg } from './types';
|
||||
import type { LocalDb } from '../localDb';
|
||||
import type { TypedBroadcastChannel } from '../../../util/multitab';
|
||||
|
||||
import { IS_MULTITAB_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_MULTITAB_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { DATA_BROADCAST_CHANNEL_NAME, DEBUG } from '../../../config';
|
||||
import generateIdFor from '../../../util/generateIdFor';
|
||||
import { pause } from '../../../util/schedulers';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IS_IOS, IS_SAFARI } from '../util/environment';
|
||||
import { IS_IOS, IS_SAFARI } from '../util/windowEnvironment';
|
||||
import { initializeSoundsForSafari } from '../global/actions/ui/calls';
|
||||
|
||||
export { default as GroupCall } from '../components/calls/group/GroupCall';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { getActions, getGlobal } from '../global';
|
||||
|
||||
import { IS_MULTITAB_SUPPORTED } from '../util/environment';
|
||||
import { IS_MULTITAB_SUPPORTED } from '../util/windowEnvironment';
|
||||
import { DEBUG } from '../config';
|
||||
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
|
||||
@ -5,7 +5,7 @@ import { getActions, withGlobal } from '../../global';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import '../../global/actions/initial';
|
||||
import { PLATFORM_ENV } from '../../util/environment';
|
||||
import { PLATFORM_ENV } from '../../util/windowEnvironment';
|
||||
import useHistoryBack from '../../hooks/useHistoryBack';
|
||||
import useCurrentOrPrev from '../../hooks/useCurrentOrPrev';
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import React, {
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { pick } from '../../util/iteratees';
|
||||
import renderText from '../common/helpers/renderText';
|
||||
import useHistoryBack from '../../hooks/useHistoryBack';
|
||||
|
||||
@ -12,7 +12,7 @@ import type { GlobalState } from '../../global/types';
|
||||
import type { LangCode } from '../../types';
|
||||
import type { ApiCountryCode } from '../../api/types';
|
||||
|
||||
import { IS_SAFARI, IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_SAFARI, IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { preloadImage } from '../../util/files';
|
||||
import preloadFonts from '../../util/fonts';
|
||||
import { pick } from '../../util/iteratees';
|
||||
|
||||
@ -17,7 +17,7 @@ import {
|
||||
IS_ANDROID,
|
||||
IS_IOS,
|
||||
IS_REQUEST_FULLSCREEN_SUPPORTED,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { LOCAL_TGS_URLS } from '../../common/helpers/animatedAssets';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import {
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
IS_ANDROID,
|
||||
IS_IOS,
|
||||
IS_REQUEST_FULLSCREEN_SUPPORTED,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { LOCAL_TGS_URLS } from '../../common/helpers/animatedAssets';
|
||||
import { selectTabState } from '../../../global/selectors';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
@ -13,7 +13,7 @@ import type { AnimationLevel } from '../../types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
|
||||
import { ANIMATION_LEVEL_MAX, IS_TEST } from '../../config';
|
||||
import { VIDEO_AVATARS_DISABLED } from '../../util/environment';
|
||||
import { VIDEO_AVATARS_DISABLED } from '../../util/windowEnvironment';
|
||||
import {
|
||||
getChatAvatarHash,
|
||||
getChatTitle,
|
||||
|
||||
@ -11,7 +11,7 @@ import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import type { ApiChat } from '../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { getOrderedTopics } from '../../global/helpers';
|
||||
import { getIsMobile } from '../../hooks/useAppLayout';
|
||||
|
||||
@ -2,7 +2,7 @@ import type { RefObject } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useRef, useState } from '../../lib/teact/teact';
|
||||
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../util/environment';
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../util/windowEnvironment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { formatMediaDateTime, formatPastTimeShort } from '../../util/dateFormat';
|
||||
import { getColorFromExtension, getFileSizeString } from './helpers/documentInfo';
|
||||
|
||||
@ -6,7 +6,7 @@ import React, {
|
||||
import type { ApiVideo } from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
|
||||
@ -5,7 +5,7 @@ import React, {
|
||||
} from '../../lib/teact/teact';
|
||||
|
||||
import { MIN_PASSWORD_LENGTH } from '../../config';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import stopEvent from '../../util/stopEvent';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
||||
@ -11,7 +11,7 @@ import type { GlobalState } from '../../global/types';
|
||||
import type { AnimationLevel } from '../../types';
|
||||
import { MediaViewerOrigin } from '../../types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../util/memo';
|
||||
import {
|
||||
selectTabState,
|
||||
|
||||
@ -3,7 +3,7 @@ import React, { memo, useEffect, useRef } from '../../lib/teact/teact';
|
||||
import type { FC, TeactNode } from '../../lib/teact/teact';
|
||||
import type { ApiChat, ApiPhoto, ApiUser } from '../../api/types';
|
||||
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../util/environment';
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../util/windowEnvironment';
|
||||
import {
|
||||
getChatAvatarHash,
|
||||
getChatTitle,
|
||||
|
||||
@ -4,7 +4,7 @@ import React, { memo, useCallback } from '../../lib/teact/teact';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
import styles from './SliderDots.module.scss';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import Button from '../ui/Button';
|
||||
|
||||
type OwnProps = {
|
||||
|
||||
@ -8,7 +8,7 @@ import type { ApiBotInlineMediaResult, ApiSticker } from '../../api/types';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { preventMessageInputBlurWithBubbling } from '../middle/helpers/preventMessageInputBlur';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { getServerTimeOffset } from '../../util/serverTime';
|
||||
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
|
||||
@ -5,7 +5,7 @@ import type { FC } from '../../lib/teact/teact';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import type { ApiSticker } from '../../api/types';
|
||||
|
||||
import { IS_WEBM_SUPPORTED } from '../../util/environment';
|
||||
import { IS_WEBM_SUPPORTED } from '../../util/windowEnvironment';
|
||||
import * as mediaLoader from '../../util/mediaLoader';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import generateIdFor from '../../util/generateIdFor';
|
||||
|
||||
@ -3,7 +3,7 @@ import type {
|
||||
} from '../../../api/types';
|
||||
|
||||
import { STICKER_SIZE_INLINE_DESKTOP_FACTOR, STICKER_SIZE_INLINE_MOBILE_FACTOR } from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import windowSize from '../../../util/windowSize';
|
||||
import { getPhotoInlineDimensions, getVideoDimensions } from '../../../global/helpers';
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { TextPart } from '../../../types';
|
||||
|
||||
import EMOJI_REGEX from '../../../lib/twemojiRegex';
|
||||
import { RE_LINK_TEMPLATE, RE_MENTION_TEMPLATE } from '../../../config';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import {
|
||||
fixNonStandardEmoji,
|
||||
handleEmojiLoad,
|
||||
|
||||
@ -7,7 +7,7 @@ import type { FC } from '../../lib/teact/teact';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
import { LeftColumnContent, SettingsScreens } from '../../types';
|
||||
|
||||
import { IS_MAC_OS, IS_PWA, LAYERS_ANIMATION_NAME } from '../../util/environment';
|
||||
import { IS_MAC_OS, IS_PWA, LAYERS_ANIMATION_NAME } from '../../util/windowEnvironment';
|
||||
import captureEscKeyListener from '../../util/captureEscKeyListener';
|
||||
import { selectTabState, selectCurrentChat, selectIsForumPanelOpen } from '../../global/selectors';
|
||||
import useFoldersReducer from '../../hooks/reducers/useFoldersReducer';
|
||||
|
||||
@ -17,7 +17,7 @@ import type { AnimationLevel } from '../../../types';
|
||||
import type { ChatAnimationTypes } from './hooks';
|
||||
|
||||
import { MAIN_THREAD_ID } from '../../../api/types';
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import {
|
||||
isUserId,
|
||||
getPrivateChatUserId,
|
||||
|
||||
@ -10,7 +10,7 @@ import type { FolderEditDispatch } from '../../../hooks/reducers/useFoldersReduc
|
||||
import type { GlobalState } from '../../../global/types';
|
||||
|
||||
import { ALL_FOLDER_ID } from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { captureEvents, SwipeDirection } from '../../../util/captureEvents';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import captureEscKeyListener from '../../../util/captureEscKeyListener';
|
||||
|
||||
@ -16,7 +16,7 @@ import {
|
||||
CHAT_HEIGHT_PX,
|
||||
CHAT_LIST_SLICE,
|
||||
} from '../../../config';
|
||||
import { IS_MAC_OS, IS_PWA } from '../../../util/environment';
|
||||
import { IS_MAC_OS, IS_PWA } from '../../../util/windowEnvironment';
|
||||
import { getPinnedChatsCount, getOrderKey } from '../../../util/folderManager';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import {
|
||||
GENERAL_TOPIC_ID,
|
||||
TOPICS_SLICE, TOPIC_HEIGHT_PX, TOPIC_LIST_SENSITIVE_AREA, ANIMATION_LEVEL_MIN,
|
||||
} from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import {
|
||||
selectChat, selectCurrentMessageList, selectIsForumPanelOpen, selectTabState,
|
||||
} from '../../../global/selectors';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { SettingsScreens } from '../../../types';
|
||||
import { LeftColumnContent } from '../../../types';
|
||||
import type { FolderEditDispatch } from '../../../hooks/reducers/useFoldersReducer';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import useShowTransition from '../../../hooks/useShowTransition';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
||||
@ -19,7 +19,7 @@ import {
|
||||
IS_TEST,
|
||||
PRODUCTION_HOSTNAME,
|
||||
} from '../../../config';
|
||||
import { IS_PWA } from '../../../util/environment';
|
||||
import { IS_PWA } from '../../../util/windowEnvironment';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { formatDateToString } from '../../../util/dateFormat';
|
||||
import switchTheme from '../../../util/switchTheme';
|
||||
|
||||
@ -11,7 +11,7 @@ import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
import type { ChatAnimationTypes } from './hooks';
|
||||
import type { AnimationLevel } from '../../../types';
|
||||
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import {
|
||||
selectCanDeleteTopic,
|
||||
selectChat,
|
||||
|
||||
@ -6,7 +6,7 @@ import type { MenuItemContextAction } from '../../../ui/ListItem';
|
||||
|
||||
import { compact } from '../../../../util/iteratees';
|
||||
import { getCanManageTopic, getHasAdminRight } from '../../../../global/helpers';
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../../util/environment';
|
||||
import { IS_OPEN_IN_NEW_TAB_SUPPORTED } from '../../../../util/windowEnvironment';
|
||||
|
||||
import useLang from '../../../../hooks/useLang';
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import React, { memo, useCallback, useState } from '../../../lib/teact/teact';
|
||||
|
||||
import { LeftColumnContent } from '../../../types';
|
||||
|
||||
import { LAYERS_ANIMATION_NAME } from '../../../util/environment';
|
||||
import { LAYERS_ANIMATION_NAME } from '../../../util/windowEnvironment';
|
||||
|
||||
import Transition from '../../ui/Transition';
|
||||
import NewChatStep1 from './NewChatStep1';
|
||||
|
||||
@ -4,7 +4,7 @@ import React, { memo, useCallback, useState } from '../../../lib/teact/teact';
|
||||
import { SettingsScreens } from '../../../types';
|
||||
import type { FolderEditDispatch, FoldersState } from '../../../hooks/reducers/useFoldersReducer';
|
||||
|
||||
import { LAYERS_ANIMATION_NAME } from '../../../util/environment';
|
||||
import { LAYERS_ANIMATION_NAME } from '../../../util/windowEnvironment';
|
||||
import useTwoFaReducer from '../../../hooks/reducers/useTwoFaReducer';
|
||||
|
||||
import Transition from '../../ui/Transition';
|
||||
|
||||
@ -9,7 +9,7 @@ import { SettingsScreens } from '../../../types';
|
||||
|
||||
import {
|
||||
getSystemTheme, IS_IOS, IS_MAC_OS, IS_TOUCH_ENV,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { pick } from '../../../util/iteratees';
|
||||
import { setTimeFormat } from '../../../util/langProvider';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
||||
@ -6,7 +6,7 @@ import { withGlobal } from '../../../../global';
|
||||
|
||||
import type { ApiSticker } from '../../../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../../util/windowEnvironment';
|
||||
import { selectAnimatedEmoji } from '../../../../global/selectors';
|
||||
import useLang from '../../../../hooks/useLang';
|
||||
import useHistoryBack from '../../../../hooks/useHistoryBack';
|
||||
|
||||
@ -6,7 +6,7 @@ import { withGlobal } from '../../../../global';
|
||||
|
||||
import type { ApiSticker } from '../../../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../../util/windowEnvironment';
|
||||
import { selectAnimatedEmoji } from '../../../../global/selectors';
|
||||
import renderText from '../../../common/helpers/renderText';
|
||||
import useFlag from '../../../../hooks/useFlag';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ApiMessage } from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
|
||||
import { selectTabState } from '../../global/selectors';
|
||||
import { IS_OPFS_SUPPORTED, IS_SERVICE_WORKER_SUPPORTED, MAX_BUFFER_SIZE } from '../../util/environment';
|
||||
import { IS_OPFS_SUPPORTED, IS_SERVICE_WORKER_SUPPORTED, MAX_BUFFER_SIZE } from '../../util/windowEnvironment';
|
||||
import * as mediaLoader from '../../util/mediaLoader';
|
||||
import download from '../../util/download';
|
||||
import {
|
||||
|
||||
@ -15,7 +15,7 @@ import '../../global/actions/all';
|
||||
import {
|
||||
BASE_EMOJI_KEYWORD_LANG, DEBUG, INACTIVE_MARKER,
|
||||
} from '../../config';
|
||||
import { IS_ANDROID } from '../../util/environment';
|
||||
import { IS_ANDROID } from '../../util/windowEnvironment';
|
||||
import {
|
||||
selectChatMessage,
|
||||
selectTabState,
|
||||
|
||||
@ -6,7 +6,7 @@ import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import type { ApiCountryCode, ApiUser, ApiUserStatus } from '../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { getUserStatus } from '../../global/helpers';
|
||||
import { selectUser, selectUserStatus } from '../../global/selectors';
|
||||
import renderText from '../common/helpers/renderText';
|
||||
|
||||
@ -23,7 +23,7 @@ import {
|
||||
} from '../../global/selectors';
|
||||
import { stopCurrentAudio } from '../../util/audioPlayer';
|
||||
import captureEscKeyListener from '../../util/captureEscKeyListener';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { ANIMATION_END_DELAY } from '../../config';
|
||||
import { MEDIA_VIEWER_MEDIA_QUERY } from '../common/helpers/mediaDimensions';
|
||||
import { disableDirectTextInput, enableDirectTextInput } from '../../util/directInputManager';
|
||||
|
||||
@ -8,7 +8,7 @@ import type {
|
||||
import type { AnimationLevel } from '../../types';
|
||||
import { MediaViewerOrigin } from '../../types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import {
|
||||
selectChat, selectChatMessage, selectTabState, selectIsMessageProtected, selectScheduledMessage, selectUser,
|
||||
} from '../../global/selectors';
|
||||
|
||||
@ -9,7 +9,7 @@ import type { RealTouchEvent } from '../../util/captureEvents';
|
||||
import { animateNumber, timingFunctions } from '../../util/animation';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { captureEvents, IOS_SCREEN_EDGE_THRESHOLD } from '../../util/captureEvents';
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { clamp, isBetween, round } from '../../util/math';
|
||||
import { debounce } from '../../util/schedulers';
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
|
||||
import type { ChildrenFn, TransitionProps } from '../ui/Transition';
|
||||
import Transition from '../ui/Transition';
|
||||
|
||||
@ -6,7 +6,7 @@ import { getActions } from '../../global';
|
||||
|
||||
import type { ApiDimensions } from '../../api/types';
|
||||
|
||||
import { IS_IOS, IS_TOUCH_ENV, IS_YA_BROWSER } from '../../util/environment';
|
||||
import { IS_IOS, IS_TOUCH_ENV, IS_YA_BROWSER } from '../../util/windowEnvironment';
|
||||
import safePlay from '../../util/safePlay';
|
||||
import stopEvent from '../../util/stopEvent';
|
||||
import useBuffering from '../../hooks/useBuffering';
|
||||
|
||||
@ -5,7 +5,7 @@ import React, {
|
||||
|
||||
import type { BufferedRange } from '../../hooks/useBuffering';
|
||||
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { formatMediaDuration } from '../../util/dateFormat';
|
||||
import { formatFileSize } from '../../util/textFormat';
|
||||
|
||||
@ -11,7 +11,7 @@ import {
|
||||
} from '../../common/helpers/mediaDimensions';
|
||||
import windowSize from '../../../util/windowSize';
|
||||
import stopEvent from '../../../util/stopEvent';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { getMessageHtmlId } from '../../../global/helpers';
|
||||
import { isElementInViewport } from '../../../util/isElementInViewport';
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import type {
|
||||
ApiAudio, ApiChat, ApiMessage, ApiUser,
|
||||
} from '../../api/types';
|
||||
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_IOS, IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import { PLAYBACK_RATE_FOR_AUDIO_MIN_DURATION } from '../../config';
|
||||
|
||||
import * as mediaLoader from '../../util/mediaLoader';
|
||||
|
||||
@ -6,7 +6,7 @@ import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import type { ActiveEmojiInteraction } from '../../global/types';
|
||||
|
||||
import { IS_ANDROID } from '../../util/environment';
|
||||
import { IS_ANDROID } from '../../util/windowEnvironment';
|
||||
import useFlag from '../../hooks/useFlag';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
@ -13,7 +13,7 @@ import type { IAnchorPosition } from '../../types';
|
||||
import { ManagementScreens } from '../../types';
|
||||
|
||||
import { ANIMATION_LEVEL_MIN } from '../../config';
|
||||
import { ARE_CALLS_SUPPORTED, IS_PWA } from '../../util/environment';
|
||||
import { ARE_CALLS_SUPPORTED, IS_PWA } from '../../util/windowEnvironment';
|
||||
import {
|
||||
isChatBasicGroup, isChatChannel, isChatSuperGroup, isUserId,
|
||||
} from '../../global/helpers';
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
getMessageMediaHash, getMessageSingleInlineButton,
|
||||
} from '../../global/helpers';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import renderText from '../common/helpers/renderText';
|
||||
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
|
||||
@ -41,7 +41,7 @@ import {
|
||||
getPhotoFullDimensions,
|
||||
} from '../../global/helpers';
|
||||
import { orderBy } from '../../util/iteratees';
|
||||
import { DPR } from '../../util/environment';
|
||||
import { DPR } from '../../util/windowEnvironment';
|
||||
import { fastRaf, debounce, onTickEnd } from '../../util/schedulers';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { groupMessages } from './helpers/groupMessages';
|
||||
|
||||
@ -27,7 +27,7 @@ import {
|
||||
GENERAL_TOPIC_ID,
|
||||
TMP_CHAT_ID,
|
||||
} from '../../config';
|
||||
import { MASK_IMAGE_DISABLED } from '../../util/environment';
|
||||
import { MASK_IMAGE_DISABLED } from '../../util/windowEnvironment';
|
||||
import { DropAreaState } from './composer/DropArea';
|
||||
import {
|
||||
selectChat,
|
||||
|
||||
@ -5,7 +5,7 @@ import type { ISettings } from '../../../types';
|
||||
import type { ApiDocument } from '../../../api/types';
|
||||
import { ApiMediaFormat } from '../../../api/types';
|
||||
|
||||
import { IS_COMPACT_MENU } from '../../../util/environment';
|
||||
import { IS_COMPACT_MENU } from '../../../util/windowEnvironment';
|
||||
import useMedia from '../../../hooks/useMedia';
|
||||
import { getDocumentMediaHash } from '../../../global/helpers';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
SUPPORTED_IMAGE_CONTENT_TYPES,
|
||||
SUPPORTED_VIDEO_CONTENT_TYPES,
|
||||
} from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { openSystemFilesDialog } from '../../../util/systemFilesDialog';
|
||||
import { validateFiles } from '../../../util/files';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { getActions } from '../../../global';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import type { ApiBotCommand } from '../../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import useMouseInside from '../../../hooks/useMouseInside';
|
||||
import useAppLayout from '../../../hooks/useAppLayout';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import type { ApiMessage } from '../../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { selectChatMessage, selectCurrentMessageList } from '../../../global/selectors';
|
||||
import useMouseInside from '../../../hooks/useMouseInside';
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ import {
|
||||
EDITABLE_INPUT_CSS_SELECTOR,
|
||||
MAX_UPLOAD_FILEPART_SIZE, EDITABLE_INPUT_MODAL_ID,
|
||||
} from '../../../config';
|
||||
import { IS_VOICE_RECORDING_SUPPORTED, IS_IOS } from '../../../util/environment';
|
||||
import { IS_VOICE_RECORDING_SUPPORTED, IS_IOS } from '../../../util/windowEnvironment';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||
import {
|
||||
selectChat,
|
||||
|
||||
@ -16,7 +16,7 @@ import {
|
||||
STICKER_PICKER_MAX_SHARED_COVERS,
|
||||
STICKER_SIZE_PICKER_HEADER,
|
||||
} from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||
import fastSmoothScroll from '../../../util/fastSmoothScroll';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import useMouseInside from '../../../hooks/useMouseInside';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import React, { memo, useCallback } from '../../../lib/teact/teact';
|
||||
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { handleEmojiLoad, LOADED_EMOJIS } from '../../../util/emoji';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import type {
|
||||
} from '../../../util/emoji';
|
||||
|
||||
import { MENU_TRANSITION_DURATION, RECENT_SYMBOL_SET_ID } from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||
import { uncompressEmoji } from '../../../util/emoji';
|
||||
import fastSmoothScroll from '../../../util/fastSmoothScroll';
|
||||
|
||||
@ -7,7 +7,7 @@ import { getActions, withGlobal } from '../../../global';
|
||||
import type { ApiVideo } from '../../../api/types';
|
||||
|
||||
import { SLIDE_TRANSITION_DURATION } from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { selectCurrentMessageList, selectIsChatWithSelf } from '../../../global/selectors';
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import { getActions } from '../../../global';
|
||||
import type { ApiBotInlineMediaResult, ApiBotInlineResult, ApiBotInlineSwitchPm } from '../../../api/types';
|
||||
import { LoadMoreDirection } from '../../../types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import setTooltipItemVisible from '../../../util/setTooltipItemVisible';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import useShowTransition from '../../../hooks/useShowTransition';
|
||||
|
||||
@ -11,7 +11,7 @@ import type { Signal } from '../../../util/signals';
|
||||
import { EDITABLE_INPUT_ID } from '../../../config';
|
||||
import {
|
||||
IS_ANDROID, IS_EMOJI_SUPPORTED, IS_IOS, IS_TOUCH_ENV,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { selectIsInSelectMode, selectReplyingToId } from '../../../global/selectors';
|
||||
import { debounce } from '../../../util/schedulers';
|
||||
import focusEditableElement from '../../../util/focusEditableElement';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ApiSendAsPeerId } from '../../../api/types';
|
||||
|
||||
import setTooltipItemVisible from '../../../util/setTooltipItemVisible';
|
||||
import { useKeyboardNavigation } from './hooks/useKeyboardNavigation';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { isUserId } from '../../../global/helpers';
|
||||
import useMouseInside from '../../../hooks/useMouseInside';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
||||
@ -15,7 +15,7 @@ import {
|
||||
SLIDE_TRANSITION_DURATION, STICKER_PICKER_MAX_SHARED_COVERS,
|
||||
STICKER_SIZE_PICKER_HEADER,
|
||||
} from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { MEMO_EMPTY_ARRAY } from '../../../util/memo';
|
||||
import fastSmoothScroll from '../../../util/fastSmoothScroll';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
|
||||
import { STICKER_SIZE_PICKER_HEADER } from '../../../config';
|
||||
import { selectIsAlwaysHighPriorityEmoji } from '../../../global/selectors';
|
||||
import { IS_WEBM_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_WEBM_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { getFirstLetters } from '../../../util/textFormat';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { getStickerPreviewHash } from '../../../global/helpers';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { FC } from '../../../lib/teact/teact';
|
||||
import type { ApiSticker, ApiVideo } from '../../../api/types';
|
||||
import type { GlobalActions } from '../../../global';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { fastRaf } from '../../../util/schedulers';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { selectTabState, selectIsCurrentUserPremium } from '../../../global/selectors';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IS_IOS } from '../../../../util/environment';
|
||||
import { IS_IOS } from '../../../../util/windowEnvironment';
|
||||
|
||||
let resetInput: HTMLInputElement;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Signal } from '../../../../util/signals';
|
||||
|
||||
import { getActions } from '../../../../global';
|
||||
import { EMOJI_IMG_REGEX } from '../../../../config';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../../util/environment';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../../util/windowEnvironment';
|
||||
import { getHtmlBeforeSelection } from '../../../../util/selection';
|
||||
import focusEditableElement from '../../../../util/focusEditableElement';
|
||||
import { buildCustomEmojiHtml } from '../helpers/customEmoji';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Signal } from '../../../../util/signals';
|
||||
|
||||
import { ApiMessageEntityTypes } from '../../../../api/types';
|
||||
import { DRAFT_DEBOUNCE, EDITABLE_INPUT_CSS_SELECTOR } from '../../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../../../util/windowEnvironment';
|
||||
import focusEditableElement from '../../../../util/focusEditableElement';
|
||||
import parseMessageInput from '../../../../util/parseMessageInput';
|
||||
import { getTextWithEntitiesAsHtml } from '../../../common/helpers/renderTextWithEntities';
|
||||
|
||||
@ -5,7 +5,7 @@ import type { Signal } from '../../../../util/signals';
|
||||
|
||||
import { getActions } from '../../../../global';
|
||||
import { EMOJI_IMG_REGEX } from '../../../../config';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../../util/environment';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../../util/windowEnvironment';
|
||||
import parseEmojiOnlyString from '../../../../util/parseEmojiOnlyString';
|
||||
import twemojiRegex from '../../../../lib/twemojiRegex';
|
||||
import { prepareForRegExp } from '../helpers/prepareForRegExp';
|
||||
|
||||
@ -2,7 +2,7 @@ import {
|
||||
useCallback, useEffect, useRef, useState,
|
||||
} from '../../../../lib/teact/teact';
|
||||
|
||||
import { IS_SAFARI, IS_VOICE_RECORDING_SUPPORTED } from '../../../../util/environment';
|
||||
import { IS_SAFARI, IS_VOICE_RECORDING_SUPPORTED } from '../../../../util/windowEnvironment';
|
||||
import * as voiceRecording from '../../../../util/voiceRecording';
|
||||
import captureEscKeyListener from '../../../../util/captureEscKeyListener';
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type React from '../../../lib/teact/teact';
|
||||
|
||||
import { EDITABLE_INPUT_ID } from '../../../config';
|
||||
import { IS_IOS } from '../../../util/environment';
|
||||
import { IS_IOS } from '../../../util/windowEnvironment';
|
||||
|
||||
export function preventMessageInputBlur(e: React.MouseEvent<HTMLElement>, withBubbling = false) {
|
||||
if (
|
||||
|
||||
@ -3,7 +3,7 @@ import { getActions } from '../../../global';
|
||||
|
||||
import type { MessageListType } from '../../../global/types';
|
||||
|
||||
import { IS_ANDROID } from '../../../util/environment';
|
||||
import { IS_ANDROID } from '../../../util/windowEnvironment';
|
||||
import { useIntersectionObserver } from '../../../hooks/useIntersectionObserver';
|
||||
import useBackgroundMode from '../../../hooks/useBackgroundMode';
|
||||
import useAppLayout from '../../../hooks/useAppLayout';
|
||||
|
||||
@ -6,7 +6,7 @@ import { LoadMoreDirection } from '../../../types';
|
||||
import type { MessageListType } from '../../../global/types';
|
||||
|
||||
import { LOCAL_MESSAGE_MIN_ID, MESSAGE_LIST_SLICE } from '../../../config';
|
||||
import { IS_SCROLL_PATCH_NEEDED, MESSAGE_LIST_SENSITIVE_AREA } from '../../../util/environment';
|
||||
import { IS_SCROLL_PATCH_NEEDED, MESSAGE_LIST_SENSITIVE_AREA } from '../../../util/windowEnvironment';
|
||||
import { debounce } from '../../../util/schedulers';
|
||||
import { useIntersectionObserver, useOnIntersect } from '../../../hooks/useIntersectionObserver';
|
||||
import useSyncEffect from '../../../hooks/useSyncEffect';
|
||||
|
||||
@ -29,7 +29,7 @@ import {
|
||||
isChatGroup, isOwnMessage, areReactionsEmpty, isUserId, isMessageLocal, getMessageVideo, getChatMessageLink,
|
||||
} from '../../../global/helpers';
|
||||
import { SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';
|
||||
import { IS_TRANSLATION_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_TRANSLATION_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { copyTextToClipboard } from '../../../util/clipboard';
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import React, { memo, useMemo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import type { ApiEmojiStatus, ApiReactionCustomEmoji } from '../../../api/types';
|
||||
|
||||
import { IS_OFFSET_PATH_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_OFFSET_PATH_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { getStickerPreviewHash } from '../../../global/helpers';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import useMedia from '../../../hooks/useMedia';
|
||||
|
||||
@ -32,7 +32,7 @@ import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
import { AudioOrigin } from '../../../types';
|
||||
import { MAIN_THREAD_ID } from '../../../api/types';
|
||||
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { EMOJI_STATUS_LOOP_LIMIT, GENERAL_TOPIC_ID } from '../../../config';
|
||||
import {
|
||||
selectChat,
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ApiMessage, PhoneCallAction } from '../../../api/types';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { formatTimeDuration, formatTime } from '../../../util/dateFormat';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/environment';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
|
||||
import Button from '../../ui/Button';
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import type {
|
||||
|
||||
import { getTouchY } from '../../../util/scrollLock';
|
||||
import { createClassNameBuilder } from '../../../util/buildClassName';
|
||||
import { IS_COMPACT_MENU } from '../../../util/environment';
|
||||
import { IS_COMPACT_MENU } from '../../../util/windowEnvironment';
|
||||
import { isSameReaction, canSendReaction, getReactionUniqueKey } from '../../../global/helpers';
|
||||
|
||||
import useHorizontalScroll from '../../../hooks/useHorizontalScroll';
|
||||
|
||||
@ -3,7 +3,7 @@ import React, { memo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import type { ApiAvailableReaction, ApiReaction } from '../../../api/types';
|
||||
|
||||
import { IS_COMPACT_MENU } from '../../../util/environment';
|
||||
import { IS_COMPACT_MENU } from '../../../util/windowEnvironment';
|
||||
import { createClassNameBuilder } from '../../../util/buildClassName';
|
||||
import useMedia from '../../../hooks/useMedia';
|
||||
import useFlag from '../../../hooks/useFlag';
|
||||
|
||||
@ -7,7 +7,7 @@ import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import type { ApiChat, ApiSponsoredMessage, ApiUser } from '../../../api/types';
|
||||
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||
import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities';
|
||||
import { selectChat, selectSponsoredMessage, selectUser } from '../../../global/selectors';
|
||||
import { getChatTitle, getUserFullName } from '../../../global/helpers';
|
||||
|
||||
@ -8,7 +8,7 @@ import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||
import { getStickerDimensions } from '../../common/helpers/mediaDimensions';
|
||||
import { getMessageMediaHash } from '../../../global/helpers';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { IS_WEBM_SUPPORTED } from '../../../util/environment';
|
||||
import { IS_WEBM_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { getActions } from '../../../global';
|
||||
|
||||
import { useIsIntersecting } from '../../../hooks/useIntersectionObserver';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { ApiMessage } from '../../../../api/types';
|
||||
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../../../util/environment';
|
||||
import { IS_CANVAS_FILTER_SUPPORTED } from '../../../../util/windowEnvironment';
|
||||
import { getMessageMediaThumbDataUri } from '../../../../global/helpers';
|
||||
import useCanvasBlur from '../../../../hooks/useCanvasBlur';
|
||||
import useAppLayout from '../../../../hooks/useAppLayout';
|
||||
|
||||
@ -3,7 +3,7 @@ import type React from '../../../../lib/teact/teact';
|
||||
import { useEffect, useRef } from '../../../../lib/teact/teact';
|
||||
import { getActions } from '../../../../global';
|
||||
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../../util/environment';
|
||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../../util/windowEnvironment';
|
||||
import windowSize from '../../../../util/windowSize';
|
||||
import { captureEvents, SwipeDirection } from '../../../../util/captureEvents';
|
||||
import useFlag from '../../../../hooks/useFlag';
|
||||
|
||||
@ -4,7 +4,7 @@ import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import type { ApiChat, ApiVideo } from '../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import {
|
||||
selectCurrentGifSearch,
|
||||
selectChat,
|
||||
|
||||
@ -23,7 +23,7 @@ import {
|
||||
SHARED_MEDIA_SLICE,
|
||||
SLIDE_TRANSITION_DURATION,
|
||||
} from '../../config';
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
import {
|
||||
getHasAdminRight, isChatAdmin, isChatChannel, isChatGroup, isUserBot, isUserId, isUserRightBanned,
|
||||
} from '../../global/helpers';
|
||||
|
||||
@ -8,7 +8,7 @@ import React, {
|
||||
|
||||
import { debounce } from '../../util/schedulers';
|
||||
import resetScroll from '../../util/resetScroll';
|
||||
import { IS_ANDROID } from '../../util/environment';
|
||||
import { IS_ANDROID } from '../../util/windowEnvironment';
|
||||
import buildStyle from '../../util/buildStyle';
|
||||
|
||||
type OwnProps = {
|
||||
|
||||
@ -2,7 +2,7 @@ import type { RefObject } from 'react';
|
||||
import type { FC, TeactNode } from '../../lib/teact/teact';
|
||||
import React, { useRef, useCallback } from '../../lib/teact/teact';
|
||||
|
||||
import { IS_TOUCH_ENV, MouseButton } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV, MouseButton } from '../../util/windowEnvironment';
|
||||
import { fastRaf } from '../../util/schedulers';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import buildStyle from '../../util/buildStyle';
|
||||
import { dispatchHeavyAnimationEvent } from '../../hooks/useHeavyAnimationCheck';
|
||||
import useHistoryBack from '../../hooks/useHistoryBack';
|
||||
import { preventMessageInputBlurWithBubbling } from '../middle/helpers/preventMessageInputBlur';
|
||||
import { IS_BACKDROP_BLUR_SUPPORTED, IS_COMPACT_MENU } from '../../util/environment';
|
||||
import { IS_BACKDROP_BLUR_SUPPORTED, IS_COMPACT_MENU } from '../../util/windowEnvironment';
|
||||
|
||||
import Portal from './Portal';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import React, { useCallback } from '../../lib/teact/teact';
|
||||
import { IS_TEST } from '../../config';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import useLang from '../../hooks/useLang';
|
||||
import { IS_COMPACT_MENU } from '../../util/environment';
|
||||
import { IS_COMPACT_MENU } from '../../util/windowEnvironment';
|
||||
|
||||
import './MenuItem.scss';
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import React, { useRef, useCallback, memo } from '../../lib/teact/teact';
|
||||
|
||||
import type { OwnProps as ButtonProps } from './Button';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { IS_TOUCH_ENV } from '../../util/windowEnvironment';
|
||||
|
||||
import Button from './Button';
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useRef, useEffect } from '../../lib/teact/teact';
|
||||
|
||||
import { ALL_FOLDER_ID } from '../../config';
|
||||
import { IS_ANDROID, IS_IOS } from '../../util/environment';
|
||||
import { IS_ANDROID, IS_IOS } from '../../util/windowEnvironment';
|
||||
import fastSmoothScrollHorizontal from '../../util/fastSmoothScrollHorizontal';
|
||||
|
||||
import usePrevious from '../../hooks/usePrevious';
|
||||
|
||||
@ -15,7 +15,7 @@ import {
|
||||
} from '../../../config';
|
||||
import {
|
||||
IS_MOV_SUPPORTED, IS_WEBM_SUPPORTED, MAX_BUFFER_SIZE, PLATFORM_ENV,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { unsubscribe } from '../../../util/notifications';
|
||||
import * as cacheApi from '../../../util/cacheApi';
|
||||
import { updateAppBadge } from '../../../util/appBadge';
|
||||
|
||||
@ -32,7 +32,7 @@ import {
|
||||
SUPPORTED_IMAGE_CONTENT_TYPES,
|
||||
SUPPORTED_VIDEO_CONTENT_TYPES,
|
||||
} from '../../../config';
|
||||
import { IS_IOS } from '../../../util/environment';
|
||||
import { IS_IOS } from '../../../util/windowEnvironment';
|
||||
import { callApi, cancelApiProgress } from '../../../api/gramjs';
|
||||
import {
|
||||
areSortedArraysIntersecting, buildCollectionByKey, omit, split, unique,
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
joinPhoneCall, processSignalingMessage,
|
||||
} from '../../../lib/secret-sauce';
|
||||
import type { ApiPhoneCall } from '../../../api/types';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/environment';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { callApi } from '../../../api/gramjs';
|
||||
import * as langProvider from '../../../util/langProvider';
|
||||
import { EMOJI_DATA, EMOJI_OFFSETS } from '../../../util/phoneCallEmojiConstants';
|
||||
|
||||
@ -3,7 +3,7 @@ import { removeGroupCall, updateGroupCall, updateGroupCallParticipant } from '..
|
||||
import { omit } from '../../../util/iteratees';
|
||||
import { selectChat } from '../../selectors';
|
||||
import { updateChat } from '../../reducers';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/environment';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import { notifyAboutCall } from '../../../util/notifications';
|
||||
import { selectGroupCall, selectPhoneCallUser } from '../../selectors/calls';
|
||||
import { checkNavigatorUserMediaPermissions, initializeSounds } from '../ui/calls';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { addActionHandler } from '../../index';
|
||||
|
||||
import { IS_PRODUCTION_HOST } from '../../../util/environment';
|
||||
import { IS_PRODUCTION_HOST } from '../../../util/windowEnvironment';
|
||||
import { closeInvoice } from '../../reducers';
|
||||
import * as langProvider from '../../../util/langProvider';
|
||||
import { formatCurrency } from '../../../util/formatCurrency';
|
||||
|
||||
@ -21,7 +21,7 @@ import { selectActiveGroupCall, selectChatGroupCall, selectGroupCall } from '../
|
||||
import { getMainUsername } from '../../helpers';
|
||||
import { buildCollectionByKey, omit } from '../../../util/iteratees';
|
||||
import safePlay from '../../../util/safePlay';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/environment';
|
||||
import { ARE_CALLS_SUPPORTED } from '../../../util/windowEnvironment';
|
||||
import * as langProvider from '../../../util/langProvider';
|
||||
import { updateTabState } from '../../reducers/tabs';
|
||||
import { getCurrentTabId } from '../../../util/establishMultitabRole';
|
||||
|
||||
@ -3,7 +3,7 @@ import { addActionHandler, getGlobal, setGlobal } from '../../index';
|
||||
import { ANIMATION_LEVEL_MAX } from '../../../config';
|
||||
import {
|
||||
IS_ANDROID, IS_IOS, IS_MAC_OS, IS_SAFARI, IS_TOUCH_ENV,
|
||||
} from '../../../util/environment';
|
||||
} from '../../../util/windowEnvironment';
|
||||
import { setLanguage } from '../../../util/langProvider';
|
||||
import switchTheme from '../../../util/switchTheme';
|
||||
import { selectTabState, selectNotifySettings, selectTheme } from '../../selectors';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user