Global: Split types into separate files (#5341)

This commit is contained in:
zubiden 2024-12-29 11:58:32 +01:00 committed by Alexander Zinchuk
parent a3f57d2982
commit 6563d37e8a
113 changed files with 1665 additions and 1507 deletions

View File

@ -2,8 +2,7 @@
import BigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiLimitType, ApiPremiumSection } from '../../../global/types';
import type { ApiAppConfig } from '../../types';
import type { ApiAppConfig, ApiLimitType, ApiPremiumSection } from '../../types';
import {
DEFAULT_LIMITS,

View File

@ -1,16 +1,18 @@
import { Api as GramJs } from '../../../lib/gramjs';
import { strippedPhotoToJpg } from '../../../lib/gramjs/Utils';
import type { ApiPrivacySettings, BotsPrivacyType, PrivacyVisibility } from '../../../types';
import type {
ApiFormattedText,
ApiMessageEntity,
ApiMessageEntityDefault,
ApiPhoto,
ApiPhotoSize,
ApiPrivacySettings,
ApiThumbnail,
ApiUsername,
ApiVideoSize,
BotsPrivacyType,
PrivacyVisibility,
} from '../../types';
import {
ApiMessageEntityTypes,

View File

@ -1,11 +1,11 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiDraft } from '../../../global/types';
import type {
ApiAction,
ApiAttachment,
ApiChat,
ApiContact,
ApiDraft,
ApiFactCheck,
ApiFormattedText,
ApiGroupCall,

View File

@ -1,12 +1,19 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiPrivacyKey } from '../../../types';
import type {
ApiChatLink,
ApiCollectionInfo,
ApiConfig, ApiCountry, ApiLanguage, ApiOldLangString,
ApiCollectibleInfo,
ApiConfig,
ApiCountry,
ApiLanguage,
ApiOldLangString,
ApiPeerColors,
ApiSession, ApiTimezone, ApiUrlAuthResult, ApiWallpaper, ApiWebSession,
ApiPrivacyKey,
ApiSession,
ApiTimezone,
ApiUrlAuthResult,
ApiWallpaper,
ApiWebSession,
LangPackStringValue,
} from '../../types';
@ -332,7 +339,7 @@ export function buildApiChatLink(data: GramJs.account.ResolvedBusinessChatLinks)
};
}
export function buildApiCollectibleInfo(info: GramJs.fragment.TypeCollectibleInfo): ApiCollectionInfo {
export function buildApiCollectibleInfo(info: GramJs.fragment.TypeCollectibleInfo): ApiCollectibleInfo {
const {
amount,
currency,

View File

@ -1,7 +1,6 @@
import bigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiPremiumSection } from '../../../global/types';
import type {
ApiBoost,
ApiBoostsStatus,
@ -15,6 +14,7 @@ import type {
ApiPaymentSavedInfo,
ApiPremiumGiftCodeOption,
ApiPremiumPromo,
ApiPremiumSection,
ApiPremiumSubscriptionOption,
ApiPrepaidGiveaway,
ApiPrepaidStarsGiveaway,

View File

@ -2,7 +2,6 @@ import BigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import { generateRandomBytes, readBigIntFromBuffer } from '../../../lib/gramjs/Helpers';
import type { ApiInputPrivacyRules, ApiPrivacyKey } from '../../../types';
import type {
ApiBotApp,
ApiChatAdminRights,
@ -11,6 +10,7 @@ import type {
ApiChatReactions,
ApiFormattedText,
ApiGroupCall,
ApiInputPrivacyRules,
ApiInputReplyInfo,
ApiInputStorePaymentPurpose,
ApiMessageEntity,
@ -19,6 +19,7 @@ import type {
ApiPhoto,
ApiPoll,
ApiPremiumGiftCodeOption,
ApiPrivacyKey,
ApiReactionWithPaid,
ApiReportReason,
ApiRequestInputInvoice,

View File

@ -1,7 +1,6 @@
import BigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiDraft } from '../../../global/types';
import type {
ApiChat,
ApiChatAdminRights,
@ -9,6 +8,7 @@ import type {
ApiChatFolder,
ApiChatFullInfo,
ApiChatReactions,
ApiDraft,
ApiGroupCall,
ApiMessage,
ApiMissingInvitedUser,

View File

@ -1,8 +1,7 @@
import BigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import type { WebPageMediaSize } from '../../../global/types';
import type { ThreadId } from '../../../types';
import type { ThreadId, WebPageMediaSize } from '../../../types';
import type {
ApiAttachment,
ApiChat,

View File

@ -2,14 +2,15 @@ import BigInt from 'big-integer';
import { Api as GramJs } from '../../../lib/gramjs';
import type { LANG_PACKS } from '../../../config';
import type { ApiInputPrivacyRules, ApiPrivacyKey } from '../../../types';
import type {
ApiAppConfig,
ApiConfig,
ApiError,
ApiInputPrivacyRules,
ApiLanguage,
ApiNotifyException,
ApiPhoto,
ApiPrivacyKey,
ApiUser,
} from '../../types';

View File

@ -1,8 +1,8 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiInputPrivacyRules } from '../../../types';
import type {
ApiError,
ApiInputPrivacyRules,
ApiPeer,
ApiPeerStories,
ApiReaction,

View File

@ -1,6 +1,6 @@
import type { ApiBotCommand } from './bots';
import type {
ApiChatReactions, ApiFormattedText, ApiPhoto, ApiStickerSet,
ApiChatReactions, ApiFormattedText, ApiInputMessageReplyInfo, ApiPhoto, ApiStickerSet,
} from './messages';
import type { ApiChatInviteImporter } from './misc';
import type {
@ -296,3 +296,11 @@ export interface ApiChatLink {
chatId: string;
text: ApiFormattedText;
}
export type ApiDraft = {
text?: ApiFormattedText;
replyInfo?: ApiInputMessageReplyInfo;
date?: number;
effectId?: string;
isLocal?: boolean;
};

View File

@ -1,5 +1,4 @@
import type { WebPageMediaSize } from '../../global/types';
import type { ThreadId } from '../../types';
import type { ThreadId, WebPageMediaSize } from '../../types';
import type { ApiWebDocument } from './bots';
import type { ApiGroupCall, PhoneCallAction } from './calls';
import type { ApiChat, ApiPeerColor } from './chats';

View File

@ -1,9 +1,10 @@
import type { TeactNode } from '../../lib/teact/teact';
import type { ApiLimitType, ApiPremiumSection, CallbackAction } from '../../global/types';
import type { CallbackAction } from '../../global/types';
import type { IconName } from '../../types/icons';
import type { LangFnParameters } from '../../util/localization';
import type { ApiDocument, ApiPhoto, ApiReaction } from './messages';
import type { ApiPremiumSection, ApiStarsSubscriptionPricing } from './payments';
import type { ApiUser } from './users';
export interface ApiInitialArgs {
@ -176,11 +177,6 @@ export type ApiChatInviteInfo = {
subscriptionPricing?: ApiStarsSubscriptionPricing;
};
export type ApiStarsSubscriptionPricing = {
period: number;
amount: number;
};
export type ApiChatInviteImporter = {
userId: string;
date: number;
@ -304,7 +300,7 @@ type ApiUrlAuthResultDefault = {
export type ApiUrlAuthResult = ApiUrlAuthResultRequest | ApiUrlAuthResultAccepted | ApiUrlAuthResultDefault;
export interface ApiCollectionInfo {
export interface ApiCollectibleInfo {
amount: number;
currency: string;
cryptoAmount: number;
@ -321,3 +317,27 @@ export interface ApiPeerPhotos {
nextOffset?: number;
isLoading?: boolean;
}
export type ApiLimitType =
| 'uploadMaxFileparts'
| 'stickersFaved'
| 'savedGifs'
| 'dialogFiltersChats'
| 'dialogFilters'
| 'dialogFolderPinned'
| 'captionLength'
| 'channels'
| 'channelsPublic'
| 'aboutLength'
| 'chatlistInvites'
| 'chatlistJoined'
| 'recommendedChannels'
| 'savedDialogsPinned';
export type ApiLimitTypeWithModal = Exclude<ApiLimitType, (
'captionLength' | 'aboutLength' | 'stickersFaved' | 'savedGifs' | 'recommendedChannels'
)>;
export type ApiLimitTypeForPromo = Exclude<ApiLimitType,
'uploadMaxFileparts' | 'chatlistInvites' | 'chatlistJoined' | 'savedDialogsPinned'
>;

View File

@ -1,4 +1,4 @@
import type { ApiPremiumSection } from '../../global/types';
import type { PREMIUM_FEATURE_SECTIONS } from '../../config';
import type { ApiWebDocument } from './bots';
import type { ApiChat } from './chats';
import type {
@ -9,7 +9,6 @@ import type {
ApiPaymentCredentials,
BoughtPaidMedia,
} from './messages';
import type { ApiStarsSubscriptionPricing } from './misc';
import type { StatisticsOverviewPercentage } from './statistics';
import type { ApiUser } from './users';
@ -116,6 +115,8 @@ export interface ApiReceiptRegular {
export type ApiReceipt = ApiReceiptRegular | ApiReceiptStars;
export type ApiPremiumSection = typeof PREMIUM_FEATURE_SECTIONS[number];
export interface ApiPremiumPromo {
videoSections: ApiPremiumSection[];
videos: ApiDocument[];
@ -387,6 +388,11 @@ export interface ApiStarsSubscription {
invoiceSlug?: string;
}
export type ApiStarsSubscriptionPricing = {
period: number;
amount: number;
};
export interface ApiStarTopupOption {
isExtended?: true;
stars: number;
@ -409,3 +415,5 @@ export interface ApiStarGiveawayOption {
amount: number;
winners: ApiStarsGiveawayWinnerOption[];
}
export type ApiPaymentStatus = 'paid' | 'failed' | 'pending' | 'cancelled';

View File

@ -1,3 +1,33 @@
import type { ApiChat } from './chats';
import type { ApiUser } from './users';
export type ApiPrivacyKey = 'phoneNumber' | 'addByPhone' | 'lastSeen' | 'profilePhoto' | 'voiceMessages' |
'forwards' | 'chatInvite' | 'phoneCall' | 'phoneP2P' | 'bio' | 'birthday' | 'gifts';
export type PrivacyVisibility = 'everybody' | 'contacts' | 'closeFriends' | 'nonContacts' | 'nobody';
export type BotsPrivacyType = 'allow' | 'disallow' | 'none';
export interface ApiPrivacySettings {
visibility: PrivacyVisibility;
isUnspecified?: boolean;
allowUserIds: string[];
allowChatIds: string[];
blockUserIds: string[];
blockChatIds: string[];
shouldAllowPremium?: true;
botsPrivacy: BotsPrivacyType;
}
export interface ApiInputPrivacyRules {
visibility: PrivacyVisibility;
isUnspecified?: boolean;
allowedUsers?: ApiUser[];
allowedChats?: ApiChat[];
blockedUsers?: ApiUser[];
blockedChats?: ApiChat[];
shouldAllowPremium?: true;
botsPrivacy: BotsPrivacyType;
}
export interface ApiLanguage {
isOfficial?: true;
isRtl?: true;

View File

@ -1,4 +1,3 @@
import type { ApiPrivacySettings } from '../../types';
import type {
ApiGeoPoint,
ApiMessage,
@ -8,6 +7,7 @@ import type {
ApiStoryForwardInfo,
MediaContent,
} from './messages';
import type { ApiPrivacySettings } from './settings';
export interface ApiStory {
'@type'?: 'story';

View File

@ -1,4 +1,4 @@
import type { ApiDraft, TabState } from '../../global/types';
import type { TabState } from '../../global/types';
import type {
GroupCallConnectionData,
GroupCallConnectionState,
@ -6,7 +6,7 @@ import type {
VideoRotation,
VideoState,
} from '../../lib/secret-sauce';
import type { ApiPrivacyKey, PrivacyVisibility, ThreadId } from '../../types';
import type { ThreadId } from '../../types';
import type { ApiBotMenuButton } from './bots';
import type {
ApiGroupCall, ApiPhoneCall,
@ -16,6 +16,7 @@ import type {
ApiChatFolder,
ApiChatFullInfo,
ApiChatMember,
ApiDraft,
ApiTypingStatus,
} from './chats';
import type {
@ -35,7 +36,7 @@ import type {
ApiEmojiInteraction, ApiError, ApiNotifyException, ApiSessionData,
} from './misc';
import type { ApiStarsAmount } from './payments';
import type { LangPackStringValue } from './settings';
import type { ApiPrivacyKey, LangPackStringValue, PrivacyVisibility } from './settings';
import type { ApiStealthMode, ApiStory, ApiStorySkipped } from './stories';
import type {
ApiEmojiStatus, ApiUser, ApiUserFullInfo, ApiUserStatus,

View File

@ -15,6 +15,7 @@ import type {
ApiBotMenuButton,
ApiChat,
ApiChatFullInfo,
ApiDraft,
ApiFormattedText,
ApiMessage,
ApiMessageEntity,
@ -29,10 +30,15 @@ import type {
ApiWebPage,
} from '../../api/types';
import type {
ApiDraft, GlobalState, MessageList, MessageListType, TabState,
GlobalState, TabState,
} from '../../global/types';
import type {
IAnchorPosition, InlineBotSettings, ISettings, ThreadId,
IAnchorPosition,
InlineBotSettings,
ISettings,
MessageList,
MessageListType,
ThreadId,
} from '../../types';
import { MAIN_THREAD_ID } from '../../api/types';

View File

@ -4,8 +4,7 @@ import React, {
useMemo,
useRef,
} from '../../lib/teact/teact';
import { getGlobal } from '../../lib/teact/teactn';
import { getActions, withGlobal } from '../../global';
import { getActions, getGlobal, withGlobal } from '../../global';
import type { ApiSticker } from '../../api/types';

View File

@ -5,7 +5,7 @@ import React, {
import { getActions, withGlobal } from '../../global';
import type { ApiSticker, ApiStickerSet } from '../../api/types';
import type { MessageList } from '../../global/types';
import type { MessageList } from '../../types';
import { EMOJI_SIZE_MODAL, STICKER_SIZE_MODAL, TME_LINK_PREFIX } from '../../config';
import { getAllowedAttachmentOptions, getCanPostInChat } from '../../global/helpers';

View File

@ -5,8 +5,8 @@ import type {
ApiChat,
ApiMessage, ApiPeer, ApiReplyInfo, MediaContainer,
} from '../../../api/types';
import type { ChatTranslatedMessages } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type { ChatTranslatedMessages } from '../../../types';
import type { IconName } from '../../../types/icons';
import { CONTENT_NOT_SUPPORTED } from '../../../config';

View File

@ -1,7 +1,7 @@
import { useEffect, useRef } from '../../../lib/teact/teact';
import { getActions } from '../../../global';
import type { ActiveEmojiInteraction } from '../../../global/types';
import type { ActiveEmojiInteraction } from '../../../types';
import buildStyle from '../../../util/buildStyle';
import safePlay from '../../../util/safePlay';

View File

@ -4,6 +4,7 @@ import { getActions, withGlobal } from '../../../global';
import type {
ApiChat,
ApiDraft,
ApiMessage,
ApiMessageOutgoingStatus,
ApiPeer,
@ -13,7 +14,6 @@ import type {
ApiUser,
ApiUserStatus,
} from '../../../api/types';
import type { ApiDraft } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type { ChatAnimationTypes } from './hooks';
import { MAIN_THREAD_ID } from '../../../api/types';

View File

@ -6,7 +6,7 @@ import React, {
import { getActions, withGlobal } from '../../../global';
import type { ApiChat } from '../../../api/types';
import type { TopicsInfo } from '../../../global/types';
import type { TopicsInfo } from '../../../types';
import { MAIN_THREAD_ID } from '../../../api/types';
import {

View File

@ -3,10 +3,9 @@ import React, { memo } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type {
ApiChat, ApiMessage, ApiMessageOutgoingStatus,
ApiChat, ApiDraft, ApiMessage, ApiMessageOutgoingStatus,
ApiPeer, ApiTopic, ApiTypeStory, ApiTypingStatus,
} from '../../../api/types';
import type { ApiDraft } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type { ChatAnimationTypes } from './hooks';

View File

@ -4,10 +4,9 @@ import React, {
import { getGlobal } from '../../../../global';
import type {
ApiChat, ApiMessage, ApiPeer, ApiTopic, ApiTypingStatus, ApiUser,
ApiChat, ApiDraft, ApiMessage, ApiPeer, ApiTopic, ApiTypingStatus, ApiUser,
StatefulMediaContent,
} from '../../../../api/types';
import type { ApiDraft } from '../../../../global/types';
import type { ObserveFn } from '../../../../hooks/useIntersectionObserver';
import { ANIMATION_END_DELAY, CHAT_HEIGHT_PX } from '../../../../config';

View File

@ -1,7 +1,7 @@
import React, { memo } from '../../../lib/teact/teact';
import { getActions } from '../../../global';
import type { ApiPremiumSection } from '../../../global/types';
import type { ApiPremiumSection } from '../../../api/types';
import useLastCallback from '../../../hooks/useLastCallback';
import useOldLang from '../../../hooks/useOldLang';

View File

@ -2,8 +2,8 @@ import type { FC } from '../../../lib/teact/teact';
import React, { memo, useCallback, useEffect } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type { ApiPrivacySettings } from '../../../api/types';
import type { GlobalState } from '../../../global/types';
import type { ApiPrivacySettings } from '../../../types';
import { SettingsScreens } from '../../../types';
import { selectCanSetPasscode, selectIsCurrentUserPremium } from '../../../global/selectors';

View File

@ -1,7 +1,7 @@
import React, { memo } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type { PrivacyVisibility } from '../../../types';
import type { PrivacyVisibility } from '../../../api/types';
import { selectIsCurrentUserPremium, selectShouldHideReadMarks } from '../../../global/selectors';
import renderText from '../../common/helpers/renderText';

View File

@ -2,8 +2,7 @@ import type { FC } from '../../../lib/teact/teact';
import React, { memo, useCallback, useMemo } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type { ApiPhoto } from '../../../api/types';
import type { ApiPrivacySettings, BotsPrivacyType } from '../../../types';
import type { ApiPhoto, ApiPrivacySettings, BotsPrivacyType } from '../../../api/types';
import { SettingsScreens } from '../../../types';
import { selectIsCurrentUserPremium, selectUserFullInfo } from '../../../global/selectors';

View File

@ -4,8 +4,9 @@ import React, {
} from '../../../lib/teact/teact';
import { getActions, getGlobal, withGlobal } from '../../../global';
import type { ApiPrivacySettings } from '../../../api/types';
import type { GlobalState } from '../../../global/types';
import type { ApiPrivacySettings, CustomPeerType, UniqueCustomPeer } from '../../../types';
import type { CustomPeerType, UniqueCustomPeer } from '../../../types';
import { SettingsScreens } from '../../../types';
import { ALL_FOLDER_ID, ARCHIVED_FOLDER_ID, SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';

View File

@ -1,4 +1,4 @@
import type { ApiPrivacyKey } from '../../../../types';
import type { ApiPrivacyKey } from '../../../../api/types';
import { SettingsScreens } from '../../../../types';
export function getPrivacyKey(screen: SettingsScreens): ApiPrivacyKey | undefined {

View File

@ -5,7 +5,7 @@ import { getActions, withGlobal } from '../../global';
import type {
ApiContact, ApiError,
} from '../../api/types';
import type { MessageList } from '../../global/types';
import type { MessageList } from '../../types';
import { selectCurrentMessageList, selectTabState } from '../../global/selectors';
import getReadableErrorText from '../../util/getReadableErrorText';

View File

@ -1,7 +1,6 @@
import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback, useEffect } from '../../lib/teact/teact';
import { getActions } from '../../lib/teact/teactn';
import { withGlobal } from '../../global';
import { getActions, withGlobal } from '../../global';
import type { TabState } from '../../global/types';
@ -41,6 +40,7 @@ const GameModal: FC<OwnProps & StateProps> = ({ openedGame, gameTitle, canPost }
}, isOpen && canPost ? PLAY_GAME_ACTION_INTERVAL : undefined);
const handleMessage = useCallback((event: MessageEvent<string>) => {
if (!chatId || !messageId) return;
try {
const data = JSON.parse(event.data) as GameEvents;
if (data.eventType === 'share_score') {

View File

@ -8,8 +8,8 @@ import React, {
import { addExtraClass } from '../../lib/teact/teact-dom';
import { getActions, getGlobal, withGlobal } from '../../global';
import type { ApiChatFolder, ApiUser } from '../../api/types';
import type { ApiLimitTypeWithModal, TabState } from '../../global/types';
import type { ApiChatFolder, ApiLimitTypeWithModal, ApiUser } from '../../api/types';
import type { TabState } from '../../global/types';
import { ElectronEvent } from '../../types/electron';
import { BASE_EMOJI_KEYWORD_LANG, DEBUG, INACTIVE_MARKER } from '../../config';

View File

@ -4,8 +4,13 @@ import React, {
} from '../../../lib/teact/teact';
import { toggleExtraClass } from '../../../lib/teact/teact-dom';
import type { ApiPremiumPromo, ApiPremiumSubscriptionOption } from '../../../api/types';
import type { ApiLimitTypeForPromo, ApiPremiumSection, GlobalState } from '../../../global/types';
import type {
ApiLimitTypeForPromo,
ApiPremiumPromo,
ApiPremiumSection,
ApiPremiumSubscriptionOption,
} from '../../../api/types';
import type { GlobalState } from '../../../global/types';
import { PREMIUM_BOTTOM_VIDEOS, PREMIUM_FEATURE_SECTIONS, PREMIUM_LIMITS_ORDER } from '../../../config';
import { requestMutation } from '../../../lib/fasterdom/fasterdom';

View File

@ -5,9 +5,9 @@ import React, {
import { getActions, withGlobal } from '../../../global';
import type {
ApiPremiumPromo, ApiPremiumSubscriptionOption, ApiSticker, ApiStickerSet, ApiUser,
ApiPremiumPromo, ApiPremiumSection, ApiPremiumSubscriptionOption, ApiSticker, ApiStickerSet, ApiUser,
} from '../../../api/types';
import type { ApiPremiumSection, GlobalState } from '../../../global/types';
import type { GlobalState } from '../../../global/types';
import { PREMIUM_FEATURE_SECTIONS, TME_LINK_PREFIX } from '../../../config';
import { getUserFullName } from '../../../global/helpers';

View File

@ -2,7 +2,7 @@ import type { FC } from '../../../../lib/teact/teact';
import React, { memo, useCallback, useEffect } from '../../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../../global';
import type { ApiLimitTypeWithModal } from '../../../../global/types';
import type { ApiLimitTypeWithModal } from '../../../../api/types';
import type { OldLangFn } from '../../../../hooks/useOldLang';
import type { IconName } from '../../../../types/icons';

View File

@ -1,7 +1,8 @@
import React, { memo, useRef } from '../../../lib/teact/teact';
import { withGlobal } from '../../../global';
import type { ConfettiStyle, TabState } from '../../../global/types';
import type { TabState } from '../../../global/types';
import type { ConfettiStyle } from '../../../types';
import { requestMeasure } from '../../../lib/fasterdom/fasterdom';
import { selectTabState } from '../../../global/selectors';

View File

@ -2,8 +2,7 @@ import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { ActiveDownloads, MessageListType } from '../../global/types';
import type { MediaViewerOrigin } from '../../types';
import type { ActiveDownloads, MediaViewerOrigin, MessageListType } from '../../types';
import type { MenuItemProps } from '../ui/MenuItem';
import type { MediaViewerItem } from './helpers/getViewableMedia';

View File

@ -7,9 +7,8 @@ import { getActions, getGlobal, withGlobal } from '../../global';
import type {
ApiChat, ApiMessage, ApiSticker, ApiTopic, ApiUser,
} from '../../api/types';
import type { MessageListType } from '../../global/types';
import type { ObserveFn } from '../../hooks/useIntersectionObserver';
import type { FocusDirection, ThreadId } from '../../types';
import type { FocusDirection, MessageListType, ThreadId } from '../../types';
import type { OnIntersectPinnedMessage } from './hooks/usePinnedMessage';
import { getChatTitle, getMessageHtmlId, isJoinedChannelMessage } from '../../global/helpers';

View File

@ -7,7 +7,7 @@ import { getActions, withGlobal } from '../../global';
import type {
ApiBusinessIntro, ApiSticker, ApiUpdateConnectionStateType, ApiUser,
} from '../../api/types';
import type { MessageList } from '../../global/types';
import type { MessageList } from '../../types';
import { getUserFullName } from '../../global/helpers';
import {

View File

@ -5,7 +5,7 @@ import React, {
} from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { ActiveEmojiInteraction } from '../../global/types';
import type { ActiveEmojiInteraction } from '../../types';
import {
selectAnimatedEmojiEffect,

View File

@ -2,7 +2,7 @@ import type { FC } from '../../lib/teact/teact';
import React, { memo, useEffect, useRef } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { MessageListType } from '../../global/types';
import type { MessageListType } from '../../types';
import { MAIN_THREAD_ID } from '../../api/types';
import { selectChat, selectCurrentMessageList, selectCurrentMiddleSearch } from '../../global/selectors';

View File

@ -4,8 +4,7 @@ import React, {
} from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { MessageListType } from '../../global/types';
import type { IAnchorPosition, ThreadId } from '../../types';
import type { IAnchorPosition, MessageListType, ThreadId } from '../../types';
import { MAIN_THREAD_ID } from '../../api/types';
import { ManagementScreens } from '../../types';

View File

@ -8,10 +8,9 @@ import { getActions, getGlobal, withGlobal } from '../../global';
import type {
ApiChatFullInfo, ApiMessage, ApiRestrictionReason, ApiTopic,
} from '../../api/types';
import type { MessageListType } from '../../global/types';
import type { OnIntersectPinnedMessage } from './hooks/usePinnedMessage';
import { MAIN_THREAD_ID } from '../../api/types';
import { LoadMoreDirection, type ThreadId } from '../../types';
import { LoadMoreDirection, type MessageListType, type ThreadId } from '../../types';
import {
ANIMATION_END_DELAY,

View File

@ -3,8 +3,7 @@ import type { FC } from '../../lib/teact/teact';
import React, { getIsHeavyAnimating, memo } from '../../lib/teact/teact';
import { getActions } from '../../global';
import type { MessageListType } from '../../global/types';
import type { ThreadId } from '../../types';
import type { MessageListType, ThreadId } from '../../types';
import type { Signal } from '../../util/signals';
import type { MessageDateGroup } from './helpers/groupMessages';
import type { OnIntersectPinnedMessage } from './hooks/usePinnedMessage';

View File

@ -2,7 +2,7 @@ import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { MessageList as GlobalMessageList } from '../../global/types';
import type { MessageList as GlobalMessageList } from '../../types';
import { selectTabState } from '../../global/selectors';
import { createLocationHash } from '../../util/routing';

View File

@ -3,7 +3,7 @@ import React, { memo, useEffect } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { ApiChat } from '../../api/types';
import type { MessageListType } from '../../global/types';
import type { MessageListType } from '../../types';
import type { IconName } from '../../types/icons';
import {

View File

@ -10,8 +10,9 @@ import type {
import type {
ActiveEmojiInteraction,
MessageListType,
} from '../../global/types';
import type { ThemeKey, ThreadId } from '../../types';
ThemeKey,
ThreadId,
} from '../../types';
import { MAIN_THREAD_ID } from '../../api/types';
import {

View File

@ -7,10 +7,10 @@ import { getActions, withGlobal } from '../../global';
import type {
ApiChat, ApiMessage, ApiSticker, ApiTypingStatus,
} from '../../api/types';
import type { GlobalState, MessageListType } from '../../global/types';
import type { GlobalState } from '../../global/types';
import type { Signal } from '../../util/signals';
import { MAIN_THREAD_ID } from '../../api/types';
import { StoryViewerOrigin, type ThreadId } from '../../types';
import { type MessageListType, StoryViewerOrigin, type ThreadId } from '../../types';
import {
EDITABLE_INPUT_CSS_SELECTOR,

View File

@ -4,8 +4,7 @@ import React, {
import { setExtraStyles } from '../../lib/teact/teact-dom';
import { withGlobal } from '../../global';
import type { MessageListType } from '../../global/types';
import type { ThreadId } from '../../types';
import type { MessageListType, ThreadId } from '../../types';
import type { Signal } from '../../util/signals';
import { type ApiChat, MAIN_THREAD_ID } from '../../api/types';

View File

@ -2,8 +2,8 @@ import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact';
import type { ApiTopic } from '../../api/types';
import type { MessageListType } from '../../global/types';
import type { OldLangFn } from '../../hooks/useOldLang';
import type { MessageListType } from '../../types';
import { REM } from '../common/helpers/mediaDimensions';
import renderText from '../common/helpers/renderText';

View File

@ -7,8 +7,8 @@ import { getActions, withGlobal } from '../../../global';
import type {
ApiAttachment, ApiChatMember, ApiMessage, ApiSticker,
} from '../../../api/types';
import type { GlobalState, MessageListType } from '../../../global/types';
import type { ThreadId } from '../../../types';
import type { GlobalState } from '../../../global/types';
import type { MessageListType, ThreadId } from '../../../types';
import type { Signal } from '../../../util/signals';
import {

View File

@ -7,8 +7,7 @@ import { getActions, withGlobal } from '../../../global';
import type {
ApiChat, ApiInputMessageReplyInfo, ApiMessage, ApiPeer,
} from '../../../api/types';
import type { MessageListType } from '../../../global/types';
import type { ThreadId } from '../../../types/index';
import type { MessageListType, ThreadId } from '../../../types/index';
import { isChatChannel, stripCustomEmoji } from '../../../global/helpers';
import {

View File

@ -5,8 +5,8 @@ import { getActions, withGlobal } from '../../../global';
import type {
ApiFormattedText, ApiMessage, ApiMessageEntityTextUrl, ApiWebPage,
} from '../../../api/types';
import type { GlobalState, WebPageMediaSize } from '../../../global/types';
import type { ISettings, ThreadId } from '../../../types';
import type { GlobalState } from '../../../global/types';
import type { ISettings, ThreadId, WebPageMediaSize } from '../../../types';
import type { Signal } from '../../../util/signals';
import { ApiMessageEntityTypes } from '../../../api/types';

View File

@ -1,8 +1,7 @@
import { useEffect, useLayoutEffect, useRef } from '../../../../lib/teact/teact';
import { getActions } from '../../../../global';
import type { ApiMessage } from '../../../../api/types';
import type { ApiDraft } from '../../../../global/types';
import type { ApiDraft, ApiMessage } from '../../../../api/types';
import type { ThreadId } from '../../../../types';
import type { Signal } from '../../../../util/signals';
import { ApiMessageEntityTypes } from '../../../../api/types';

View File

@ -1,9 +1,8 @@
import { useEffect, useState } from '../../../../lib/teact/teact';
import { getActions } from '../../../../global';
import type { ApiFormattedText, ApiMessage } from '../../../../api/types';
import type { ApiDraft, MessageListType } from '../../../../global/types';
import type { ThreadId } from '../../../../types';
import type { ApiDraft, ApiFormattedText, ApiMessage } from '../../../../api/types';
import type { MessageListType, ThreadId } from '../../../../types';
import type { Signal } from '../../../../util/signals';
import { ApiMessageEntityTypes } from '../../../../api/types';

View File

@ -1,7 +1,7 @@
import type { RefObject } from 'react';
import { getActions } from '../../../global';
import type { MessageListType } from '../../../global/types';
import type { MessageListType } from '../../../types';
import type { OnIntersectPinnedMessage } from './usePinnedMessage';
import { IS_ANDROID } from '../../../util/windowEnvironment';

View File

@ -2,7 +2,7 @@ import type { RefObject } from 'react';
import { useEffect, useMemo, useRef } from '../../../lib/teact/teact';
import { getActions } from '../../../global';
import type { MessageListType } from '../../../global/types';
import type { MessageListType } from '../../../types';
import type { Signal } from '../../../util/signals';
import { LoadMoreDirection } from '../../../types';

View File

@ -3,8 +3,8 @@ import React, { memo } from '../../../lib/teact/teact';
import { withGlobal } from '../../../global';
import type { ApiSticker } from '../../../api/types';
import type { ActiveEmojiInteraction } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type { ActiveEmojiInteraction } from '../../../types';
import {
selectAnimatedEmojiEffect,

View File

@ -3,8 +3,8 @@ import React, { memo } from '../../../lib/teact/teact';
import { withGlobal } from '../../../global';
import type { ApiSticker } from '../../../api/types';
import type { ActiveEmojiInteraction } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type { ActiveEmojiInteraction } from '../../../types';
import {
selectAnimatedEmoji,

View File

@ -16,8 +16,13 @@ import type {
ApiThreadInfo,
ApiTypeStory,
} from '../../../api/types';
import type { ActiveDownloads, MessageListType } from '../../../global/types';
import type { IAlbum, IAnchorPosition, ThreadId } from '../../../types';
import type {
ActiveDownloads,
IAlbum,
IAnchorPosition,
MessageListType,
ThreadId,
} from '../../../types';
import { MAIN_THREAD_ID } from '../../../api/types';
import { PREVIEW_AVATAR_COUNT, SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';

View File

@ -28,10 +28,16 @@ import type {
ApiTypeStory,
ApiUser,
} from '../../../api/types';
import type { ActiveEmojiInteraction, ChatTranslatedMessages, MessageListType } from '../../../global/types';
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
import type {
FocusDirection, IAlbum, ISettings, ScrollTargetPosition, ThreadId,
ActiveEmojiInteraction,
ChatTranslatedMessages,
FocusDirection,
IAlbum,
ISettings,
MessageListType,
ScrollTargetPosition,
ThreadId,
} from '../../../types';
import type { Signal } from '../../../util/signals';
import type { OnIntersectPinnedMessage } from '../hooks/usePinnedMessage';

View File

@ -1,5 +1,5 @@
import React, { memo } from '../../../lib/teact/teact';
import { getActions } from '../../../lib/teact/teactn';
import { getActions } from '../../../global';
import type { ApiMessage } from '../../../api/types';

View File

@ -1,7 +1,7 @@
import { useEffect } from '../../../../lib/teact/teact';
import { getActions } from '../../../../global';
import type { ChatTranslatedMessages } from '../../../../global/types';
import type { ChatTranslatedMessages } from '../../../../types';
import { throttle } from '../../../../util/schedulers';

View File

@ -2,7 +2,7 @@ import React, { memo, useEffect } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type { ApiSponsoredMessage } from '../../../api/types';
import type { MessageListType } from '../../../global/types';
import type { MessageListType } from '../../../types';
import { selectBot, selectSponsoredMessage } from '../../../global/selectors';
import buildClassName from '../../../util/buildClassName';

View File

@ -2,8 +2,7 @@ import React, { memo, useEffect } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type { ApiChat, ApiMessage, ApiPeer } from '../../../api/types';
import type { MessageListType } from '../../../global/types';
import type { ThreadId } from '../../../types';
import type { MessageListType, ThreadId } from '../../../types';
import type { Signal } from '../../../util/signals';
import { MAIN_THREAD_ID } from '../../../api/types';

View File

@ -10,7 +10,8 @@ import type {
ApiStarsAmount,
ApiUser,
} from '../../../api/types';
import type { StarGiftCategory, TabState } from '../../../global/types';
import type { TabState } from '../../../global/types';
import type { StarGiftCategory } from '../../../types';
import { getUserFullName } from '../../../global/helpers';
import { selectUser } from '../../../global/selectors';

View File

@ -3,7 +3,7 @@ import React, {
} from '../../../lib/teact/teact';
import { withGlobal } from '../../../global';
import type { StarGiftCategory } from '../../../global/types';
import type { StarGiftCategory } from '../../../types';
import buildClassName from '../../../util/buildClassName';

View File

@ -5,7 +5,7 @@ import React, {
import { getActions, getGlobal, withGlobal } from '../../../global';
import type { ApiUser } from '../../../api/types';
import type { WebApp } from '../../../global/types';
import type { WebApp } from '../../../types/webapp';
import { selectActiveWebApp, selectTabState, selectUser } from '../../../global/selectors';
import buildClassName from '../../../util/buildClassName';

View File

@ -8,9 +8,9 @@ import React, {
import { getActions, getGlobal, withGlobal } from '../../../global';
import type { ApiAttachBot, ApiChat, ApiUser } from '../../../api/types';
import type { TabState, WebApp } from '../../../global/types';
import type { TabState } from '../../../global/types';
import type { ThemeKey } from '../../../types';
import type { WebAppOutboundEvent } from '../../../types/webapp';
import type { WebApp, WebAppOutboundEvent } from '../../../types/webapp';
import { RESIZE_HANDLE_CLASS_NAME } from '../../../config';
import { getWebAppKey } from '../../../global/helpers/bots';

View File

@ -9,9 +9,11 @@ import { getActions, withGlobal } from '../../../global';
import type {
ApiAttachBot, ApiBotAppSettings, ApiChat, ApiUser,
} from '../../../api/types';
import type { TabState, WebApp, WebAppModalStateType } from '../../../global/types';
import type { TabState } from '../../../global/types';
import type { ThemeKey } from '../../../types';
import type { PopupOptions, WebAppInboundEvent, WebAppOutboundEvent } from '../../../types/webapp';
import type {
PopupOptions, WebApp, WebAppInboundEvent, WebAppModalStateType, WebAppOutboundEvent,
} from '../../../types/webapp';
import { TME_LINK_PREFIX } from '../../../config';
import { convertToApiChatType } from '../../../global/helpers';

View File

@ -2,8 +2,7 @@
import { useCallback, useEffect, useRef } from '../../../../lib/teact/teact';
import { getActions } from '../../../../global';
import type { WebApp } from '../../../../global/types';
import type { WebAppInboundEvent, WebAppOutboundEvent } from '../../../../types/webapp';
import type { WebApp, WebAppInboundEvent, WebAppOutboundEvent } from '../../../../types/webapp';
import { getWebAppKey } from '../../../../global/helpers';
import { extractCurrentThemeParams } from '../../../../util/themeStyle';

View File

@ -3,7 +3,7 @@ import React, { memo, useCallback, useRef } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { ApiChat, ApiChatFullInfo, ApiVideo } from '../../api/types';
import type { MessageList } from '../../global/types';
import type { MessageList } from '../../types';
import { getAllowedAttachmentOptions, getCanPostInChat } from '../../global/helpers';
import {

View File

@ -9,7 +9,7 @@ import type {
ApiMediaAreaChannelPost,
ApiPeer, ApiStealthMode, ApiStory, ApiTypeStory,
} from '../../api/types';
import type { IDimensions } from '../../global/types';
import type { IDimensions } from '../../types';
import type { Signal } from '../../util/signals';
import { MAIN_THREAD_ID } from '../../api/types';

View File

@ -3,8 +3,9 @@ import React, {
} from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { ApiStory, ApiUser } from '../../api/types';
import type { ApiPrivacySettings, PrivacyVisibility } from '../../types';
import type {
ApiPrivacySettings, ApiStory, ApiUser, PrivacyVisibility,
} from '../../api/types';
import type { IconName } from '../../types/icons';
import { getSenderTitle, getUserFullName } from '../../global/helpers';

View File

@ -1,4 +1,4 @@
import type { IDimensions } from '../../../global/types';
import type { IDimensions } from '../../../types';
import { roundToNearestEven } from '../../../util/math';

View File

@ -1,4 +1,4 @@
import type { IDimensions } from '../../../global/types';
import type { IDimensions } from '../../../types';
import { StoryViewerOrigin } from '../../../types';
import { ANIMATION_END_DELAY } from '../../../config';

View File

@ -1,5 +1,6 @@
import type { ApiReactionEmoji } from './api/types';
import type { ApiLimitType, ApiLimitTypeForPromo, ApiPremiumSection } from './global/types';
import type {
ApiLimitType, ApiLimitTypeForPromo, ApiPremiumSection, ApiReactionEmoji,
} from './api/types';
export const APP_CODE_NAME = 'A';
export const APP_NAME = process.env.APP_NAME || `Telegram Web ${APP_CODE_NAME}`;

View File

@ -1,10 +1,15 @@
import type { InlineBotSettings } from '../../../types';
import type { WebApp } from '../../../types/webapp';
import type { RequiredGlobalActions } from '../../index';
import type {
ActionReturnType, GlobalState, TabArgs, WebApp,
ActionReturnType, GlobalState, TabArgs,
} from '../../types';
import {
type ApiChat, type ApiContact, type ApiInputMessageReplyInfo, type ApiPeer, type ApiUrlAuthResult,
type ApiChat,
type ApiContact,
type ApiInputMessageReplyInfo,
type ApiPeer,
type ApiUrlAuthResult,
MAIN_THREAD_ID,
} from '../../../api/types';
import { ManagementProgress } from '../../../types';

View File

@ -4,12 +4,12 @@ import type {
} from '../../../api/types';
import type { RequiredGlobalActions } from '../../index';
import type {
ActionReturnType,
ChatListType, GlobalState, TabArgs,
ActionReturnType, GlobalState, TabArgs,
} from '../../types';
import { MAIN_THREAD_ID } from '../../../api/types';
import {
ChatCreationProgress,
type ChatListType,
ManagementProgress,
NewChatMembersProgress,
SettingsScreens,

View File

@ -1,6 +1,7 @@
import type {
ApiAttachment,
ApiChat,
ApiDraft,
ApiError,
ApiInputMessageReplyInfo,
ApiInputReplyInfo,
@ -19,10 +20,10 @@ import type {
import type { MessageKey } from '../../../util/keys/messageKey';
import type { RequiredGlobalActions } from '../../index';
import type {
ActionReturnType, ApiDraft, GlobalState, TabArgs, WebPageMediaSize,
ActionReturnType, GlobalState, TabArgs,
} from '../../types';
import { MAIN_THREAD_ID, MESSAGE_DELETED } from '../../../api/types';
import { LoadMoreDirection, type ThreadId } from '../../../types';
import { LoadMoreDirection, type ThreadId, type WebPageMediaSize } from '../../../types';
import {
GIF_MIME_TYPE,

View File

@ -1,7 +1,4 @@
import type { ApiUsername } from '../../../api/types';
import type {
ApiPrivacySettings,
} from '../../../types';
import type { ApiPrivacySettings, ApiUsername } from '../../../api/types';
import type { ActionReturnType } from '../../types';
import {
ProfileEditProgress,

View File

@ -1,6 +1,4 @@
import type {
StarGiftCategory,
} from '../../types';
import type { StarGiftCategory } from '../../../types';
import { getCurrentTabId } from '../../../util/establishMultitabRole';
import { buildCollectionByKey } from '../../../util/iteratees';

View File

@ -1,8 +1,8 @@
import { addCallback } from '../../../lib/teact/teactn';
import type { ThreadId } from '../../../types';
import type { Thread, ThreadId } from '../../../types';
import type { RequiredGlobalActions } from '../../index';
import type { ActionReturnType, GlobalState, Thread } from '../../types';
import type { ActionReturnType, GlobalState } from '../../types';
import { MAIN_THREAD_ID } from '../../../api/types';
import { DEBUG, MESSAGE_LIST_SLICE, SERVICE_NOTIFICATIONS_USER_ID } from '../../../config';

View File

@ -2,10 +2,10 @@ import type {
ApiChat, ApiMediaExtendedPreview, ApiMessage, ApiReactions,
MediaContent,
} from '../../../api/types';
import type { ThreadId } from '../../../types';
import type { ActiveEmojiInteraction, ThreadId } from '../../../types';
import type { RequiredGlobalActions } from '../../index';
import type {
ActionReturnType, ActiveEmojiInteraction, GlobalState, RequiredGlobalState,
ActionReturnType, GlobalState, RequiredGlobalState,
} from '../../types';
import { MAIN_THREAD_ID } from '../../../api/types';

View File

@ -1,7 +1,8 @@
import type { ApiGroupCall } from '../../../api/types';
import type { CallSound } from '../../../types';
import type { RequiredGlobalActions } from '../../index';
import type {
ActionReturnType, CallSound, GlobalState, TabArgs,
ActionReturnType, GlobalState, TabArgs,
} from '../../types';
import { requestNextMutation } from '../../../lib/fasterdom/fasterdom';

View File

@ -1,11 +1,10 @@
import type { ApiMessage } from '../../../api/types';
import type {
ActionReturnType,
ActiveDownloads,
GlobalState,
} from '../../types';
import { MAIN_THREAD_ID } from '../../../api/types';
import { FocusDirection } from '../../../types';
import { type ActiveDownloads, FocusDirection } from '../../../types';
import {
ANIMATION_END_DELAY,

View File

@ -3,8 +3,8 @@ import { getIsHeavyAnimating, onFullyIdle } from '../lib/teact/teact';
import { addCallback, removeCallback } from '../lib/teact/teactn';
import type { ApiAvailableReaction, ApiMessage } from '../api/types';
import type { ThreadId } from '../types';
import type { ActionReturnType, GlobalState, MessageList } from './types';
import type { MessageList, ThreadId } from '../types';
import type { ActionReturnType, GlobalState } from './types';
import { MAIN_THREAD_ID } from '../api/types';
import {

View File

@ -1,7 +1,5 @@
import type { ApiChatType, ApiPhoto } from '../../api/types';
import type {
WebApp,
} from '../types';
import type { WebApp } from '../../types/webapp';
import { REPLIES_USER_ID, VERIFICATION_CODES_USER_ID } from '../../config';

View File

@ -15,7 +15,7 @@ import type {
ApiWebDocument,
MediaContainer,
} from '../../api/types';
import type { ActiveDownloads } from '../types';
import type { ActiveDownloads } from '../../types';
import { ApiMediaFormat } from '../../api/types';
import {

View File

@ -1,4 +1,4 @@
import type { ApiInputPrivacyRules, BotsPrivacyType, PrivacyVisibility } from '../../types';
import type { ApiInputPrivacyRules, BotsPrivacyType, PrivacyVisibility } from '../../api/types';
import type { GlobalState } from '../types';
import { partition } from '../../util/iteratees';

View File

@ -1,6 +1,7 @@
import type { InlineBotSettings } from '../../types';
import type { WebApp, WebAppModalStateType } from '../../types/webapp';
import type {
GlobalState, TabArgs, WebApp, WebAppModalStateType,
GlobalState, TabArgs,
} from '../types';
import { getCurrentTabId } from '../../util/establishMultitabRole';

View File

@ -1,7 +1,8 @@
import type {
ApiChat, ApiChatFullInfo, ApiChatMember,
} from '../../api/types';
import type { ChatListType, GlobalState } from '../types';
import type { ChatListType } from '../../types';
import type { GlobalState } from '../types';
import { ARCHIVED_FOLDER_ID } from '../../config';
import { areDeepEqual } from '../../util/areDeepEqual';

View File

@ -1,9 +1,17 @@
import type {
ApiMessage, ApiPoll, ApiPollResult, ApiQuickReply, ApiSponsoredMessage, ApiThreadInfo,
} from '../../api/types';
import type { FocusDirection, ScrollTargetPosition, ThreadId } from '../../types';
import type {
GlobalState, MessageList, MessageListType, TabArgs, TabState, TabThread, Thread,
FocusDirection,
MessageList,
MessageListType,
ScrollTargetPosition,
TabThread,
Thread,
ThreadId,
} from '../../types';
import type {
GlobalState, TabArgs, TabState,
} from '../types';
import { MAIN_THREAD_ID } from '../../api/types';

View File

@ -5,9 +5,14 @@ import type {
ApiStarsSubscription,
ApiStarsTransaction,
} from '../../api/types';
import type { PaymentStep, ShippingOption } from '../../types';
import type {
GlobalState, StarsSubscriptions, StarsTransactionType, TabArgs, TabState,
PaymentStep,
ShippingOption,
StarsSubscriptions,
StarsTransactionType,
} from '../../types';
import type {
GlobalState, TabArgs, TabState,
} from '../types';
import { getCurrentTabId } from '../../util/establishMultitabRole';

View File

@ -1,5 +1,6 @@
import type { ApiTopic } from '../../api/types';
import type { GlobalState, TopicsInfo } from '../types';
import type { TopicsInfo } from '../../types';
import type { GlobalState } from '../types';
import { buildCollectionByKey, omit, unique } from '../../util/iteratees';
import {

View File

@ -1,5 +1,6 @@
import type { ApiFormattedText } from '../../api/types';
import type { GlobalState, TabArgs, TranslatedMessage } from '../types';
import type { TranslatedMessage } from '../../types';
import type { GlobalState, TabArgs } from '../types';
import { getCurrentTabId } from '../../util/establishMultitabRole';
import { omit } from '../../util/iteratees';

View File

@ -1,7 +1,8 @@
import type {
ApiChat, ApiChatFullInfo, ApiChatType,
} from '../../api/types';
import type { ChatListType, GlobalState, TabArgs } from '../types';
import type { ChatListType } from '../../types';
import type { GlobalState, TabArgs } from '../types';
import {
ALL_FOLDER_ID, ARCHIVED_FOLDER_ID, MEMBERS_LOAD_SLICE, SAVED_FOLDER_ID, SERVICE_NOTIFICATIONS_USER_ID,

Some files were not shown because too many files have changed in this diff Show More