mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 12:24:46 +01:00
[Refactoring] Prefer import type
(#1884)
This commit is contained in:
parent
9544663aa1
commit
70ccff110a
@ -95,6 +95,13 @@
|
||||
"@typescript-eslint/member-delimiter-style": "error",
|
||||
"@typescript-eslint/default-param-last": "off",
|
||||
"@typescript-eslint/return-await": ["error", "in-try-catch"],
|
||||
"@typescript-eslint/consistent-type-imports": [
|
||||
"error",
|
||||
{
|
||||
"prefer": "type-imports",
|
||||
"disallowTypeAnnotations": false
|
||||
}
|
||||
],
|
||||
"teactn/prefer-separate-component-file": "off"
|
||||
},
|
||||
"settings": {
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { FC, useEffect } from './lib/teact/teact';
|
||||
import type { FC } from './lib/teact/teact';
|
||||
import React, { useEffect } from './lib/teact/teact';
|
||||
import { getActions, withGlobal } from './global';
|
||||
|
||||
import { GlobalState } from './global/types';
|
||||
import type { GlobalState } from './global/types';
|
||||
|
||||
import { INACTIVE_MARKER, PAGE_TITLE } from './config';
|
||||
import { pick } from './util/iteratees';
|
||||
|
@ -2,7 +2,7 @@
|
||||
import BigInt from 'big-integer';
|
||||
import localDb from '../localDb';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { ApiAppConfig } from '../../types';
|
||||
import type { ApiAppConfig } from '../../types';
|
||||
import { buildJson } from './misc';
|
||||
|
||||
type GramJsAppConfig = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiAttachMenuBot,
|
||||
ApiAttachMenuBotIcon,
|
||||
ApiBotCommand,
|
||||
|
@ -6,7 +6,7 @@ import type {
|
||||
SsrcGroup,
|
||||
} from '../../../lib/secret-sauce';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { ApiGroupCall, ApiPhoneCall } from '../../types';
|
||||
import type { ApiGroupCall, ApiPhoneCall } from '../../types';
|
||||
import { getApiChatIdFromMtpPeer, isPeerUser } from './peers';
|
||||
|
||||
export function buildApiGroupCallParticipant(participant: GramJs.GroupCallParticipant): GroupCallParticipant {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import type BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiChat,
|
||||
ApiChatAdminRights,
|
||||
ApiChatBannedRights,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { strippedPhotoToJpg } from '../../../lib/gramjs/Utils';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ApiPhoto, ApiPhotoSize, ApiThumbnail,
|
||||
} from '../../types';
|
||||
import { bytesToDataUri } from './helpers';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import type { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
type VirtualFields =
|
||||
'flags'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiMessage,
|
||||
ApiMessageForwardInfo,
|
||||
ApiPhoto,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ApiCountry, ApiSession, ApiWallpaper,
|
||||
} from '../../types';
|
||||
import { ApiPrivacySettings, ApiPrivacyKey, PrivacyVisibility } from '../../../types';
|
||||
import type { ApiPrivacySettings, ApiPrivacyKey, PrivacyVisibility } from '../../../types';
|
||||
|
||||
import { buildApiDocument } from './messages';
|
||||
import { buildApiPeerId, getApiChatIdFromMtpPeer } from './peers';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import type { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
export function buildShippingOptions(shippingOptions: GramJs.ShippingOption[] | undefined) {
|
||||
if (!shippingOptions) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import type BigInt from 'big-integer';
|
||||
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import type { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
export function isPeerUser(peer: GramJs.TypePeer | GramJs.TypeInputPeer): peer is GramJs.PeerUser {
|
||||
return peer.hasOwnProperty('userId');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type { Api as GramJs } from '../../../lib/gramjs';
|
||||
import type {
|
||||
ApiChannelStatistics,
|
||||
ApiGroupStatistics,
|
||||
ApiMessageStatistics,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiEmojiInteraction, ApiSticker, ApiStickerSet, GramJsEmojiInteraction,
|
||||
} from '../../types';
|
||||
import { NO_STICKER_SET_ID } from '../../../config';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiUser, ApiUserStatus, ApiUserType,
|
||||
} from '../../types';
|
||||
import { buildApiPeerId } from './peers';
|
||||
|
@ -1,16 +1,15 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import { ApiPrivacyKey } from '../../../types';
|
||||
import type { ApiPrivacyKey } from '../../../types';
|
||||
|
||||
import { generateRandomBytes, readBigIntFromBuffer } from '../../../lib/gramjs/Helpers';
|
||||
import {
|
||||
import type {
|
||||
ApiChatAdminRights,
|
||||
ApiChatBannedRights,
|
||||
ApiChatFolder,
|
||||
ApiGroupCall,
|
||||
ApiMessageEntity,
|
||||
ApiMessageEntityTypes,
|
||||
ApiNewPoll,
|
||||
ApiPhoto,
|
||||
ApiPhoneCall,
|
||||
@ -20,6 +19,9 @@ import {
|
||||
ApiVideo,
|
||||
ApiThemeParameters,
|
||||
} from '../../types';
|
||||
import {
|
||||
ApiMessageEntityTypes,
|
||||
} from '../../types';
|
||||
import localDb from '../localDb';
|
||||
import { pick } from '../../../util/iteratees';
|
||||
import { deserializeBytes } from '../helpers';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../lib/gramjs';
|
||||
import { ApiMessage } from '../types';
|
||||
import type { Api as GramJs } from '../../lib/gramjs';
|
||||
import type { ApiMessage } from '../types';
|
||||
|
||||
interface LocalDb {
|
||||
localMessages: Record<string, ApiMessage>;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import BigInt from 'big-integer';
|
||||
import {
|
||||
import type {
|
||||
ApiChat, ApiPhoto, ApiReportReason, ApiUser,
|
||||
} from '../../types';
|
||||
import { invokeRequest } from './client';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { errors } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiUpdateAuthorizationState,
|
||||
ApiUpdateAuthorizationStateType,
|
||||
OnApiUpdate,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import { ApiChat, ApiThemeParameters, ApiUser } from '../../types';
|
||||
import type { ApiChat, ApiThemeParameters, ApiUser } from '../../types';
|
||||
|
||||
import localDb from '../localDb';
|
||||
import { invokeRequest } from './client';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import type { JoinGroupCallPayload } from '../../../lib/secret-sauce';
|
||||
import {
|
||||
import type {
|
||||
ApiChat, ApiUser, OnApiUpdate, ApiGroupCall, ApiPhoneCall,
|
||||
} from '../../types';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import type BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
OnApiUpdate,
|
||||
ApiChat,
|
||||
ApiMessage,
|
||||
|
@ -4,9 +4,9 @@ import {
|
||||
import TelegramClient from '../../../lib/gramjs/client/TelegramClient';
|
||||
|
||||
import { Logger as GramJsLogger } from '../../../lib/gramjs/extensions/index';
|
||||
import { TwoFaParams } from '../../../lib/gramjs/client/2fa';
|
||||
import type { TwoFaParams } from '../../../lib/gramjs/client/2fa';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ApiInitialArgs,
|
||||
ApiMediaFormat,
|
||||
ApiOnProgress,
|
||||
|
@ -2,7 +2,7 @@ import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import { invokeRequest } from './client';
|
||||
import { buildInputEntity, buildInputPeer } from '../gramjsBuilders';
|
||||
import { ApiChat, ApiUser, OnApiUpdate } from '../../types';
|
||||
import type { ApiChat, ApiUser, OnApiUpdate } from '../../types';
|
||||
import { addEntitiesWithPhotosToLocalDb } from '../helpers';
|
||||
import { buildApiExportedInvite, buildChatInviteImporter } from '../apiBuilders/chats';
|
||||
import { buildApiUser } from '../apiBuilders/users';
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { Api as GramJs, TelegramClient } from '../../../lib/gramjs';
|
||||
import type { TelegramClient } from '../../../lib/gramjs';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import type { ApiOnProgress, ApiParsedMedia, ApiPreparedMedia } from '../../types';
|
||||
import {
|
||||
ApiMediaFormat, ApiOnProgress, ApiParsedMedia, ApiPreparedMedia,
|
||||
ApiMediaFormat,
|
||||
} from '../../types';
|
||||
|
||||
import {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
ApiAttachment,
|
||||
ApiChat,
|
||||
ApiGlobalMessageSearchType,
|
||||
@ -13,13 +13,15 @@ import {
|
||||
ApiThreadInfo,
|
||||
ApiUser,
|
||||
ApiVideo,
|
||||
MAIN_THREAD_ID,
|
||||
MESSAGE_DELETED,
|
||||
OnApiUpdate,
|
||||
ApiSponsoredMessage,
|
||||
ApiSendMessageAction,
|
||||
ApiContact,
|
||||
} from '../../types';
|
||||
import {
|
||||
MAIN_THREAD_ID,
|
||||
MESSAGE_DELETED,
|
||||
} from '../../types';
|
||||
|
||||
import {
|
||||
ALL_FOLDER_ID,
|
||||
|
@ -3,7 +3,7 @@ import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { invokeRequest } from './client';
|
||||
import { buildInputPeer, buildShippingInfo } from '../gramjsBuilders';
|
||||
import { buildShippingOptions, buildPaymentForm, buildReceipt } from '../apiBuilders/payments';
|
||||
import { ApiChat, OnApiUpdate } from '../../types';
|
||||
import type { ApiChat, OnApiUpdate } from '../../types';
|
||||
|
||||
let onUpdate: OnApiUpdate;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ApiChat, ApiUser } from '../../types';
|
||||
import type { ApiChat, ApiUser } from '../../types';
|
||||
import { invokeRequest } from './client';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { buildInputPeer } from '../gramjsBuilders';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ApiAppConfig,
|
||||
ApiChat,
|
||||
ApiLangString,
|
||||
@ -10,9 +10,10 @@ import {
|
||||
ApiUser,
|
||||
ApiWallpaper,
|
||||
} from '../../types';
|
||||
import { ApiPrivacyKey, InputPrivacyRules, LangCode } from '../../../types';
|
||||
import type { ApiPrivacyKey, InputPrivacyRules, LangCode } from '../../../types';
|
||||
|
||||
import { BLOCKED_LIST_LIMIT, DEFAULT_LANG_PACK, LANG_PACKS } from '../../../config';
|
||||
import type { LANG_PACKS } from '../../../config';
|
||||
import { BLOCKED_LIST_LIMIT, DEFAULT_LANG_PACK } from '../../../config';
|
||||
import {
|
||||
buildApiCountryList,
|
||||
buildApiNotifyException,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ApiChat, ApiChannelStatistics, ApiGroupStatistics, ApiMessageStatistics, StatisticsGraph,
|
||||
} from '../../types';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import { ApiSticker, ApiVideo, OnApiUpdate } from '../../types';
|
||||
import type { ApiSticker, ApiVideo, OnApiUpdate } from '../../types';
|
||||
|
||||
import { invokeRequest } from './client';
|
||||
import { buildStickerFromDocument, buildStickerSet, buildStickerSetCovered } from '../apiBuilders/symbols';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Api as GramJs, errors } from '../../../lib/gramjs';
|
||||
|
||||
import { OnApiUpdate } from '../../types';
|
||||
import type { OnApiUpdate } from '../../types';
|
||||
|
||||
import { DEBUG } from '../../../config';
|
||||
import { invokeRequest, updateTwoFaSettings } from './client';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as methods from './index';
|
||||
import type * as methods from './index';
|
||||
|
||||
export type Methods = typeof methods;
|
||||
export type MethodArgs<N extends keyof Methods> = Parameters<Methods[N]>;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BigInt from 'big-integer';
|
||||
import { Api as GramJs } from '../../../lib/gramjs';
|
||||
import {
|
||||
import type {
|
||||
OnApiUpdate, ApiUser, ApiChat, ApiPhoto,
|
||||
} from '../../types';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {
|
||||
import type {
|
||||
OnApiUpdate,
|
||||
ApiInitialArgs,
|
||||
ApiUpdate,
|
||||
ApiOnProgress,
|
||||
} from '../types';
|
||||
import { Methods, MethodArgs, MethodResponse } from './methods/types';
|
||||
import type { Methods, MethodArgs, MethodResponse } from './methods/types';
|
||||
|
||||
import { API_THROTTLE_RESET_UPDATES, API_UPDATE_THROTTLE } from '../../config';
|
||||
import { throttle, throttleWithTickEnd } from '../../util/schedulers';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GroupCallConnectionData } from '../../lib/secret-sauce';
|
||||
import { Api as GramJs, connection } from '../../lib/gramjs';
|
||||
import { ApiMessage, ApiUpdateConnectionStateType, OnApiUpdate } from '../types';
|
||||
import type { ApiMessage, ApiUpdateConnectionStateType, OnApiUpdate } from '../types';
|
||||
|
||||
import { pick } from '../../util/iteratees';
|
||||
import {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Api } from '../../../lib/gramjs';
|
||||
import { ApiInitialArgs, ApiOnProgress, OnApiUpdate } from '../../types';
|
||||
import { Methods, MethodArgs, MethodResponse } from '../methods/types';
|
||||
import { WorkerMessageEvent, OriginRequest } from './types';
|
||||
import type { Api } from '../../../lib/gramjs';
|
||||
import type { ApiInitialArgs, ApiOnProgress, OnApiUpdate } from '../../types';
|
||||
import type { Methods, MethodArgs, MethodResponse } from '../methods/types';
|
||||
import type { WorkerMessageEvent, OriginRequest } from './types';
|
||||
|
||||
import { DEBUG } from '../../../config';
|
||||
import generateIdFor from '../../../util/generateIdFor';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ApiInitialArgs, ApiUpdate } from '../../types';
|
||||
import { Methods, MethodArgs, MethodResponse } from '../methods/types';
|
||||
import type { ApiInitialArgs, ApiUpdate } from '../../types';
|
||||
import type { Methods, MethodArgs, MethodResponse } from '../methods/types';
|
||||
|
||||
export type ThenArg<T> = T extends Promise<infer U> ? U : T;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ApiOnProgress, ApiUpdate } from '../../types';
|
||||
import { OriginMessageEvent, WorkerMessageData } from './types';
|
||||
import type { ApiOnProgress, ApiUpdate } from '../../types';
|
||||
import type { OriginMessageEvent, WorkerMessageData } from './types';
|
||||
|
||||
import { DEBUG } from '../../../config';
|
||||
import { initApi, callApi, cancelApiProgress } from '../provider';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
ApiPhoto, ApiSticker, ApiThumbnail, ApiVideo,
|
||||
} from './messages';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ApiMessage, ApiPhoto, ApiStickerSet } from './messages';
|
||||
import { ApiBotCommand } from './bots';
|
||||
import { ApiChatInviteImporter } from './misc';
|
||||
import { ApiFakeType } from './users';
|
||||
import type { ApiMessage, ApiPhoto, ApiStickerSet } from './messages';
|
||||
import type { ApiBotCommand } from './bots';
|
||||
import type { ApiChatInviteImporter } from './misc';
|
||||
import type { ApiFakeType } from './users';
|
||||
|
||||
type ApiChatType = (
|
||||
'chatTypePrivate' | 'chatTypeSecret' |
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ApiGroupCall, PhoneCallAction } from './calls';
|
||||
import type { ApiGroupCall, PhoneCallAction } from './calls';
|
||||
|
||||
export interface ApiDimensions {
|
||||
width: number;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ApiDocument, ApiPhoto } from './messages';
|
||||
import type { ApiDocument, ApiPhoto } from './messages';
|
||||
|
||||
export interface ApiInitialArgs {
|
||||
userAgent: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ApiMessage } from './messages';
|
||||
import type { ApiMessage } from './messages';
|
||||
|
||||
export interface ApiChannelStatistics {
|
||||
growthGraph?: StatisticsGraph | string;
|
||||
|
@ -5,24 +5,24 @@ import type {
|
||||
VideoState,
|
||||
VideoRotation,
|
||||
} from '../../lib/secret-sauce';
|
||||
import {
|
||||
import type {
|
||||
ApiChat,
|
||||
ApiChatFullInfo,
|
||||
ApiTypingStatus,
|
||||
ApiChatMember,
|
||||
ApiChatFolder,
|
||||
} from './chats';
|
||||
import {
|
||||
import type {
|
||||
ApiFormattedText, ApiMessage, ApiPhoto, ApiPoll, ApiReactions, ApiStickerSet, ApiThreadInfo,
|
||||
} from './messages';
|
||||
import { ApiUser, ApiUserFullInfo, ApiUserStatus } from './users';
|
||||
import {
|
||||
import type { ApiUser, ApiUserFullInfo, ApiUserStatus } from './users';
|
||||
import type {
|
||||
ApiEmojiInteraction, ApiError, ApiInviteInfo, ApiNotifyException, ApiSessionData,
|
||||
} from './misc';
|
||||
import {
|
||||
import type {
|
||||
ApiGroupCall, ApiPhoneCall,
|
||||
} from './calls';
|
||||
import { ApiBotMenuButton } from './bots';
|
||||
import type { ApiBotMenuButton } from './bots';
|
||||
import type { ApiPrivacyKey, PrivacyVisibility } from '../../types';
|
||||
|
||||
export type ApiUpdateReady = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ApiDocument, ApiPhoto } from './messages';
|
||||
import { ApiBotInfo } from './bots';
|
||||
import type { ApiDocument, ApiPhoto } from './messages';
|
||||
import type { ApiBotInfo } from './bots';
|
||||
|
||||
export interface ApiUser {
|
||||
id: string;
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { FC, useEffect, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useEffect, memo } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import '../../global/actions/initial';
|
||||
import { pick } from '../../util/iteratees';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { FormEvent } from 'react';
|
||||
import type { FormEvent } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, useState, useEffect, useCallback, memo, useRef,
|
||||
useState, useEffect, useCallback, memo, useRef,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
import { GlobalState } from '../../global/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import { pick } from '../../util/iteratees';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
@ -1,9 +1,8 @@
|
||||
import React, {
|
||||
FC, memo, useCallback, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useCallback, useState } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import { pick } from '../../util/iteratees';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
@ -1,15 +1,16 @@
|
||||
import { ChangeEvent } from 'react';
|
||||
import type { ChangeEvent } from 'react';
|
||||
|
||||
import monkeyPath from '../../assets/monkey.svg';
|
||||
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useLayoutEffect, useRef, useState,
|
||||
memo, useCallback, useEffect, useLayoutEffect, useRef, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import { LangCode } from '../../types';
|
||||
import { ApiCountryCode } from '../../api/types';
|
||||
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 { preloadImage } from '../../util/files';
|
||||
|
@ -1,11 +1,12 @@
|
||||
import QrCodeStyling from 'qr-code-styling';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, useEffect, useRef, memo, useCallback, useState,
|
||||
useEffect, useRef, memo, useCallback, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import { LangCode } from '../../types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
import type { LangCode } from '../../types';
|
||||
|
||||
import { DEFAULT_LANG_CODE } from '../../config';
|
||||
import { setLanguage } from '../../util/langProvider';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ChangeEvent } from 'react';
|
||||
import React, {
|
||||
FC, useState, memo, useCallback,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { ChangeEvent } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useState, memo, useCallback } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
|
||||
import { pick } from '../../util/iteratees';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
@ -1,9 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, useState, memo, useCallback, useRef,
|
||||
useState, memo, useCallback, useRef,
|
||||
} from '../../lib/teact/teact';
|
||||
import { withGlobal } from '../../global';
|
||||
|
||||
import { ApiCountryCode } from '../../api/types';
|
||||
import type { ApiCountryCode } from '../../api/types';
|
||||
|
||||
import { ANIMATION_END_DELAY } from '../../config';
|
||||
import { prepareSearchWordsForNeedle } from '../../util/searchWords';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { LangCode } from '../../../types';
|
||||
import type { LangCode } from '../../../types';
|
||||
|
||||
export function getSuggestedLanguage() {
|
||||
let suggestedLanguage = navigator.language;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
import React, {
|
||||
FC, memo, useEffect,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useEffect } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { ApiGroupCall, ApiUser } from '../../api/types';
|
||||
import type { ApiGroupCall, ApiUser } from '../../api/types';
|
||||
|
||||
import { selectActiveGroupCall, selectPhoneCallUser } from '../../global/selectors/calls';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { FC, memo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
import { OwnProps } from './GroupCall';
|
||||
import type { OwnProps } from './GroupCall';
|
||||
|
||||
const GroupCallAsync: FC<OwnProps> = (props) => {
|
||||
const { groupCallId } = props;
|
||||
|
@ -1,14 +1,17 @@
|
||||
import {
|
||||
import type {
|
||||
GroupCallConnectionState, GroupCallParticipant as TypeGroupCallParticipant,
|
||||
} from '../../../lib/secret-sauce';
|
||||
import {
|
||||
IS_SCREENSHARE_SUPPORTED, switchCameraInput, toggleSpeaker,
|
||||
} from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useMemo, useRef, useState,
|
||||
memo, useCallback, useEffect, useMemo, useRef, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
import '../../../global/actions/calls';
|
||||
|
||||
import { IAnchorPosition } from '../../../types';
|
||||
import type { IAnchorPosition } from '../../../types';
|
||||
|
||||
import {
|
||||
IS_ANDROID,
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import React, {
|
||||
FC, memo, useMemo, useRef,
|
||||
} from '../../../lib/teact/teact';
|
||||
import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import { THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo, useMemo, useRef } from '../../../lib/teact/teact';
|
||||
import { withGlobal } from '../../../global';
|
||||
|
||||
import { ApiChat, ApiUser } from '../../../api/types';
|
||||
import type { ApiChat, ApiUser } from '../../../api/types';
|
||||
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { selectChat, selectUser } from '../../../global/selectors';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import React, { FC, memo, useMemo } from '../../../lib/teact/teact';
|
||||
import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo, useMemo } from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { GroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import type { GroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useState,
|
||||
memo, useCallback, useEffect, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import { IAnchorPosition } from '../../../types';
|
||||
import type { IAnchorPosition } from '../../../types';
|
||||
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import useRunThrottled from '../../../hooks/useRunThrottled';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { GroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import type { GroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useMemo, useState,
|
||||
memo, useCallback, useMemo, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { withGlobal } from '../../../global';
|
||||
import GroupCallParticipantVideo from './GroupCallParticipantVideo';
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { getUserStreams, GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import React, { FC, memo, useCallback } from '../../../lib/teact/teact';
|
||||
import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import { getUserStreams, THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo, useCallback } from '../../../lib/teact/teact';
|
||||
import { withGlobal } from '../../../global';
|
||||
|
||||
import { ApiChat, ApiUser } from '../../../api/types';
|
||||
import type { ApiChat, ApiUser } from '../../../api/types';
|
||||
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { selectChat, selectUser } from '../../../global/selectors';
|
||||
|
@ -1,9 +1,10 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useMemo,
|
||||
memo, useCallback, useEffect, useMemo,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
import { ApiChat, ApiGroupCall, ApiUser } from '../../../api/types';
|
||||
import type { ApiChat, ApiGroupCall, ApiUser } from '../../../api/types';
|
||||
|
||||
import { selectChatGroupCall } from '../../../global/selectors/calls';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { GroupCallConnectionState } from '../../../lib/secret-sauce';
|
||||
import type { GroupCallConnectionState } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useEffect, useMemo, useRef, useState,
|
||||
memo, useEffect, useMemo, useRef, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { GroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import React, { FC, memo, useMemo } from '../../../lib/teact/teact';
|
||||
import type { GroupCallParticipant } from '../../../lib/secret-sauce';
|
||||
import { THRESHOLD } from '../../../lib/secret-sauce';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo, useMemo } from '../../../lib/teact/teact';
|
||||
import AnimatedIcon from '../../common/AnimatedIcon';
|
||||
import usePrevious from '../../../hooks/usePrevious';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useMemo, useRef,
|
||||
memo, useCallback, useEffect, useMemo, useRef,
|
||||
} from '../../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../../global';
|
||||
import '../../../global/actions/calls';
|
||||
|
||||
import { ApiPhoneCall, ApiUser } from '../../../api/types';
|
||||
import type { ApiPhoneCall, ApiUser } from '../../../api/types';
|
||||
|
||||
import {
|
||||
IS_ANDROID,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, memo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, memo } from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo } from '../../../lib/teact/teact';
|
||||
|
||||
import { OwnProps } from './RatePhoneCallModal';
|
||||
import type { OwnProps } from './RatePhoneCallModal';
|
||||
import { Bundles } from '../../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React, {
|
||||
FC, memo, useRef, useState,
|
||||
} from '../../../lib/teact/teact';
|
||||
import type { FC } from '../../../lib/teact/teact';
|
||||
import React, { memo, useRef, useState } from '../../../lib/teact/teact';
|
||||
import { getActions } from '../../../global';
|
||||
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
@ -1,12 +1,13 @@
|
||||
import React, {
|
||||
FC, memo,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiMediaFormat, ApiSticker } from '../../api/types';
|
||||
import { ActiveEmojiInteraction } from '../../global/types';
|
||||
import type { ApiSticker } from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
import type { ActiveEmojiInteraction } from '../../global/types';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import useMediaTransition from '../../hooks/useMediaTransition';
|
||||
import useAnimatedEmoji from './hooks/useAnimatedEmoji';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import React, {
|
||||
FC, memo, useEffect, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useEffect, useState } from '../../lib/teact/teact';
|
||||
|
||||
import getAnimationData, { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';
|
||||
import type { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';
|
||||
import getAnimationData from './helpers/animatedAssets';
|
||||
|
||||
import AnimatedSticker from './AnimatedSticker';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, useEffect, useRef, memo, useCallback, useState,
|
||||
useEffect, useRef, memo, useCallback, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
|
||||
import { fastRaf } from '../../util/schedulers';
|
||||
|
@ -1,12 +1,13 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState,
|
||||
memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions } from '../../global';
|
||||
|
||||
import {
|
||||
ApiAudio, ApiMediaFormat, ApiMessage, ApiVoice,
|
||||
} from '../../api/types';
|
||||
import { AudioOrigin, ISettings } from '../../types';
|
||||
import type { ApiAudio, ApiMessage, ApiVoice } from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
import type { ISettings } from '../../types';
|
||||
import { AudioOrigin } from '../../types';
|
||||
|
||||
import { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';
|
||||
import { formatMediaDateTime, formatMediaDuration, formatPastTimeShort } from '../../util/dateFormat';
|
||||
@ -25,9 +26,11 @@ import { getFileSizeString } from './helpers/documentInfo';
|
||||
import { decodeWaveform, interpolateArray } from '../../util/waveform';
|
||||
import useMediaWithLoadProgress from '../../hooks/useMediaWithLoadProgress';
|
||||
import useShowTransition from '../../hooks/useShowTransition';
|
||||
import useBuffering, { BufferedRange } from '../../hooks/useBuffering';
|
||||
import type { BufferedRange } from '../../hooks/useBuffering';
|
||||
import useBuffering from '../../hooks/useBuffering';
|
||||
import useAudioPlayer from '../../hooks/useAudioPlayer';
|
||||
import useLang, { LangFn } from '../../hooks/useLang';
|
||||
import type { LangFn } from '../../hooks/useLang';
|
||||
import useLang from '../../hooks/useLang';
|
||||
import { captureEvents } from '../../util/captureEvents';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import { makeTrackId } from '../../util/audioPlayer';
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { MouseEvent as ReactMouseEvent } from 'react';
|
||||
import React, {
|
||||
FC, memo, TeactNode, useCallback,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { MouseEvent as ReactMouseEvent } from 'react';
|
||||
import type { FC, TeactNode } from '../../lib/teact/teact';
|
||||
import React, { memo, useCallback } from '../../lib/teact/teact';
|
||||
|
||||
import {
|
||||
ApiChat, ApiMediaFormat, ApiPhoto, ApiUser, ApiUserStatus,
|
||||
import type {
|
||||
ApiChat, ApiPhoto, ApiUser, ApiUserStatus,
|
||||
} from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
|
||||
import { IS_TEST } from '../../config';
|
||||
import {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import { OwnProps } from './CalendarModal';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './CalendarModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
@ -1,10 +1,12 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useState, useEffect, useMemo, useCallback,
|
||||
memo, useState, useEffect, useMemo, useCallback,
|
||||
} from '../../lib/teact/teact';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { formatTime, formatDateToString, getDayStart } from '../../util/dateFormat';
|
||||
import useLang, { LangFn } from '../../hooks/useLang';
|
||||
import type { LangFn } from '../../hooks/useLang';
|
||||
import useLang from '../../hooks/useLang';
|
||||
import usePrevious from '../../hooks/usePrevious';
|
||||
import useFlag from '../../hooks/useFlag';
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useCallback, useEffect } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { GlobalState } from '../../global/types';
|
||||
import { ApiChat, ApiCountryCode, ApiUser } from '../../api/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
import type { ApiChat, ApiCountryCode, ApiUser } from '../../api/types';
|
||||
|
||||
import {
|
||||
selectChat, selectNotifyExceptions, selectNotifySettings, selectUser,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC, useCallback } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useCallback } from '../../lib/teact/teact';
|
||||
import { getActions } from '../../global';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { RefObject } from 'react';
|
||||
import React, {
|
||||
FC, memo, useRef, useCallback,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { RefObject } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useRef, useCallback } from '../../lib/teact/teact';
|
||||
|
||||
import { CHAT_HEIGHT_PX } from '../../config';
|
||||
import useInfiniteScroll from '../../hooks/useInfiniteScroll';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { FC, useCallback, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useCallback, memo } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { ApiChat } from '../../api/types';
|
||||
import type { ApiChat } from '../../api/types';
|
||||
|
||||
import { selectIsChatWithSelf, selectUser } from '../../global/selectors';
|
||||
import {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import { OwnProps } from './DeleteMessageModal';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
import type { OwnProps } from './DeleteMessageModal';
|
||||
import { Bundles } from '../../util/moduleLoader';
|
||||
|
||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||
|
@ -1,8 +1,9 @@
|
||||
import React, { FC, useCallback, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useCallback, memo } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { ApiMessage } from '../../api/types';
|
||||
import { IAlbum } from '../../types';
|
||||
import type { ApiMessage } from '../../api/types';
|
||||
import type { IAlbum } from '../../types';
|
||||
|
||||
import {
|
||||
selectAllowedMessageActions,
|
||||
|
@ -1,9 +1,10 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, useCallback, memo, useRef, useEffect, useState,
|
||||
useCallback, memo, useRef, useEffect, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import { getActions } from '../../global';
|
||||
|
||||
import { ApiMessage } from '../../api/types';
|
||||
import type { ApiMessage } from '../../api/types';
|
||||
|
||||
import { getDocumentExtension, getDocumentHasPreview } from './helpers/documentInfo';
|
||||
import {
|
||||
@ -12,7 +13,8 @@ import {
|
||||
getMessageMediaThumbDataUri,
|
||||
isMessageDocumentVideo,
|
||||
} from '../../global/helpers';
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import useMediaWithLoadProgress from '../../hooks/useMediaWithLoadProgress';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import useFlag from '../../hooks/useFlag';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { FC } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React from '../../lib/teact/teact';
|
||||
|
||||
import useLang from '../../hooks/useLang';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, useRef } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useRef } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiUser, ApiMessage, ApiChat } from '../../api/types';
|
||||
import type { ApiUser, ApiMessage, ApiChat } from '../../api/types';
|
||||
|
||||
import {
|
||||
getMessageMediaHash,
|
||||
@ -11,7 +12,8 @@ import {
|
||||
import renderText from './helpers/renderText';
|
||||
import { getPictogramDimensions } from './helpers/mediaDimensions';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import useWebpThumbnail from '../../hooks/useWebpThumbnail';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiFakeType } from '../../api/types';
|
||||
import type { ApiFakeType } from '../../api/types';
|
||||
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { RefObject } from 'react';
|
||||
import React, { FC, memo, useRef } from '../../lib/teact/teact';
|
||||
import type { RefObject } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useRef } from '../../lib/teact/teact';
|
||||
|
||||
import useShowTransition from '../../hooks/useShowTransition';
|
||||
import useMediaTransition from '../../hooks/useMediaTransition';
|
||||
|
@ -1,12 +1,15 @@
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, {
|
||||
FC, memo, useCallback, useEffect, useRef,
|
||||
memo, useCallback, useEffect, useRef,
|
||||
} from '../../lib/teact/teact';
|
||||
|
||||
import { ApiMediaFormat, ApiVideo } from '../../api/types';
|
||||
import type { ApiVideo } from '../../api/types';
|
||||
import { ApiMediaFormat } from '../../api/types';
|
||||
|
||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import { preventMessageInputBlurWithBubbling } from '../middle/helpers/preventMessageInputBlur';
|
||||
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, useCallback } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useCallback } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiGroupCall } from '../../api/types';
|
||||
import type { ApiGroupCall } from '../../api/types';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { MouseEvent as ReactMouseEvent } from 'react';
|
||||
import React, {
|
||||
FC, useEffect, useCallback, memo,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { MouseEvent as ReactMouseEvent } from 'react';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useEffect, useCallback, memo } from '../../lib/teact/teact';
|
||||
import { getActions, withGlobal } from '../../global';
|
||||
|
||||
import { ApiChat, ApiTypingStatus } from '../../api/types';
|
||||
import { GlobalState } from '../../global/types';
|
||||
import type { ApiChat, ApiTypingStatus } from '../../api/types';
|
||||
import type { GlobalState } from '../../global/types';
|
||||
import { MediaViewerOrigin } from '../../types';
|
||||
|
||||
import {
|
||||
@ -15,7 +14,8 @@ import {
|
||||
} from '../../global/helpers';
|
||||
import { selectChat, selectChatMessages, selectChatOnlineCount } from '../../global/selectors';
|
||||
import renderText from './helpers/renderText';
|
||||
import useLang, { LangFn } from '../../hooks/useLang';
|
||||
import type { LangFn } from '../../hooks/useLang';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
||||
import Avatar from './Avatar';
|
||||
import VerifiedIcon from './VerifiedIcon';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types';
|
||||
import type { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types';
|
||||
|
||||
import { formatPastTimeShort } from '../../util/dateFormat';
|
||||
import useLang from '../../hooks/useLang';
|
||||
|
@ -1,11 +1,12 @@
|
||||
import React, {
|
||||
FC, memo, useEffect, useState,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useEffect, useState } from '../../lib/teact/teact';
|
||||
|
||||
import { ActiveEmojiInteraction } from '../../global/types';
|
||||
import type { ActiveEmojiInteraction } from '../../global/types';
|
||||
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import getAnimationData, { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';
|
||||
import getAnimationData from './helpers/animatedAssets';
|
||||
import useAnimatedEmoji from './hooks/useAnimatedEmoji';
|
||||
|
||||
import AnimatedSticker from './AnimatedSticker';
|
||||
|
@ -1,8 +1,7 @@
|
||||
import React, {
|
||||
FC, memo, useCallback, useRef,
|
||||
} from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo, useCallback, useRef } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiMessage } from '../../api/types';
|
||||
import type { ApiMessage } from '../../api/types';
|
||||
|
||||
import { formatMediaDuration } from '../../util/dateFormat';
|
||||
import stopEvent from '../../util/stopEvent';
|
||||
@ -15,7 +14,8 @@ import {
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
import useMedia from '../../hooks/useMedia';
|
||||
import useMediaTransition from '../../hooks/useMediaTransition';
|
||||
import { ObserveFn, useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
|
||||
import { useIsIntersecting } from '../../hooks/useIntersectionObserver';
|
||||
|
||||
import './Media.scss';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, { FC, useCallback } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { useCallback } from '../../lib/teact/teact';
|
||||
import { getActions } from '../../global';
|
||||
|
||||
import { ApiMessage } from '../../api/types';
|
||||
import type { ApiMessage } from '../../api/types';
|
||||
|
||||
import buildClassName from '../../util/buildClassName';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { FC, memo } from '../../lib/teact/teact';
|
||||
import type { FC } from '../../lib/teact/teact';
|
||||
import React, { memo } from '../../lib/teact/teact';
|
||||
|
||||
import { ApiMessageOutgoingStatus } from '../../api/types';
|
||||
import type { ApiMessageOutgoingStatus } from '../../api/types';
|
||||
|
||||
import Transition from '../ui/Transition';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user