[Perf] Remove some redundant memo containers
This commit is contained in:
parent
be7920f9e0
commit
e056ed231b
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const AuthCodeAsync: FC = () => {
|
|||||||
return AuthCode ? <AuthCode /> : <Loading />;
|
return AuthCode ? <AuthCode /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AuthCodeAsync);
|
export default AuthCodeAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const AuthPasswordAsync: FC = () => {
|
|||||||
return AuthPassword ? <AuthPassword /> : <Loading />;
|
return AuthPassword ? <AuthPassword /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AuthPasswordAsync);
|
export default AuthPasswordAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const AuthRegisterAsync: FC = () => {
|
|||||||
return AuthRegister ? <AuthRegister /> : <Loading />;
|
return AuthRegister ? <AuthRegister /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AuthRegisterAsync);
|
export default AuthRegisterAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -14,4 +14,4 @@ const ActiveCallHeaderAsync: FC<OwnProps> = (props) => {
|
|||||||
return ActiveCallHeader ? <ActiveCallHeader /> : undefined;
|
return ActiveCallHeader ? <ActiveCallHeader /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ActiveCallHeaderAsync);
|
export default ActiveCallHeaderAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
import type { OwnProps } from './GroupCall';
|
import type { OwnProps } from './GroupCall';
|
||||||
@ -12,4 +12,4 @@ const GroupCallAsync: FC<OwnProps> = (props) => {
|
|||||||
return GroupCall ? <GroupCall {...props} /> : undefined;
|
return GroupCall ? <GroupCall {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(GroupCallAsync);
|
export default GroupCallAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import useModuleLoader from '../../../hooks/useModuleLoader';
|
import useModuleLoader from '../../../hooks/useModuleLoader';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -14,4 +14,4 @@ const PhoneCallAsync: FC<OwnProps> = (props) => {
|
|||||||
return PhoneCall ? <PhoneCall /> : undefined;
|
return PhoneCall ? <PhoneCall /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PhoneCallAsync);
|
export default PhoneCallAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
|
|
||||||
import type { OwnProps } from './RatePhoneCallModal';
|
import type { OwnProps } from './RatePhoneCallModal';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
@ -14,4 +14,4 @@ const RatePhoneCallModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return RatePhoneCallModal ? <RatePhoneCallModal {...props} /> : undefined;
|
return RatePhoneCallModal ? <RatePhoneCallModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(RatePhoneCallModalAsync);
|
export default RatePhoneCallModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './AboutAdsModal';
|
import type { OwnProps } from './AboutAdsModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const AboutAdsModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return AboutAdsModal ? <AboutAdsModal {...props} /> : undefined;
|
return AboutAdsModal ? <AboutAdsModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AboutAdsModalAsync);
|
export default AboutAdsModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './CalendarModal';
|
import type { OwnProps } from './CalendarModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const CalendarModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return CalendarModal ? <CalendarModal {...props} /> : undefined;
|
return CalendarModal ? <CalendarModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(CalendarModalAsync);
|
export default CalendarModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './CustomEmojiSetsModal';
|
import type { OwnProps } from './CustomEmojiSetsModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const CustomEmojiSetsModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return CustomEmojiSetsModal ? <CustomEmojiSetsModal {...props} /> : undefined;
|
return CustomEmojiSetsModal ? <CustomEmojiSetsModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(CustomEmojiSetsModalAsync);
|
export default CustomEmojiSetsModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './DeleteMessageModal';
|
import type { OwnProps } from './DeleteMessageModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const DeleteMessageModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return DeleteMessageModal ? <DeleteMessageModal {...props} /> : undefined;
|
return DeleteMessageModal ? <DeleteMessageModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(DeleteMessageModalAsync);
|
export default DeleteMessageModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './PinMessageModal';
|
import type { OwnProps } from './PinMessageModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const PinMessageModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return PinMessageModal ? <PinMessageModal {...props} /> : undefined;
|
return PinMessageModal ? <PinMessageModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PinMessageModalAsync);
|
export default PinMessageModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './SeenByModal';
|
import type { OwnProps } from './SeenByModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const SeenByModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return SeenByModal ? <SeenByModal {...props} /> : undefined;
|
return SeenByModal ? <SeenByModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SeenByModalAsync);
|
export default SeenByModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './StickerSetModal';
|
import type { OwnProps } from './StickerSetModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const StickerSetModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return StickerSetModal ? <StickerSetModal {...props} /> : undefined;
|
return StickerSetModal ? <StickerSetModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(StickerSetModalAsync);
|
export default StickerSetModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './UnpinAllMessagesModal';
|
import type { OwnProps } from './UnpinAllMessagesModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const UnpinAllMessagesModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return UnpinAllMessagesModal ? <UnpinAllMessagesModal {...props} /> : undefined;
|
return UnpinAllMessagesModal ? <UnpinAllMessagesModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(UnpinAllMessagesModalAsync);
|
export default UnpinAllMessagesModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './ArchivedChats';
|
import type { OwnProps } from './ArchivedChats';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ArchivedChatsAsync: FC<OwnProps> = (props) => {
|
|||||||
return ArchivedChats ? <ArchivedChats {...props} /> : <Loading />;
|
return ArchivedChats ? <ArchivedChats {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ArchivedChatsAsync);
|
export default ArchivedChatsAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './ChatFolderModal';
|
import type { OwnProps } from './ChatFolderModal';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ChatFolderModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return ChatFolderModal ? <ChatFolderModal {...props} /> : undefined;
|
return ChatFolderModal ? <ChatFolderModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ChatFolderModalAsync);
|
export default ChatFolderModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './MuteChatModal';
|
import type { OwnProps } from './MuteChatModal';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const MuteChatModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return MuteChatModal ? <MuteChatModal {...props} /> : undefined;
|
return MuteChatModal ? <MuteChatModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MuteChatModalAsync);
|
export default MuteChatModalAsync;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, {
|
import React, {
|
||||||
useState, useEffect, memo, useCallback, useMemo,
|
useState, useEffect, useCallback, useMemo,
|
||||||
} from '../../lib/teact/teact';
|
} from '../../lib/teact/teact';
|
||||||
|
|
||||||
import buildClassName from '../../util/buildClassName';
|
import buildClassName from '../../util/buildClassName';
|
||||||
@ -83,4 +83,4 @@ const NewChatButton: FC<OwnProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NewChatButton);
|
export default NewChatButton;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
import type { OwnProps } from './ContactList';
|
import type { OwnProps } from './ContactList';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ContactListAsync: FC<OwnProps> = (props) => {
|
|||||||
return ContactList ? <ContactList {...props} /> : <Loading />;
|
return ContactList ? <ContactList {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ContactListAsync);
|
export default ContactListAsync;
|
||||||
|
|||||||
@ -17,8 +17,8 @@ import {
|
|||||||
DEBUG,
|
DEBUG,
|
||||||
FEEDBACK_URL,
|
FEEDBACK_URL,
|
||||||
IS_BETA,
|
IS_BETA,
|
||||||
IS_TEST,
|
|
||||||
IS_ELECTRON,
|
IS_ELECTRON,
|
||||||
|
IS_TEST,
|
||||||
PRODUCTION_HOSTNAME,
|
PRODUCTION_HOSTNAME,
|
||||||
} from '../../../config';
|
} from '../../../config';
|
||||||
import { IS_APP } from '../../../util/windowEnvironment';
|
import { IS_APP } from '../../../util/windowEnvironment';
|
||||||
@ -33,7 +33,10 @@ import { setPermanentWebVersion } from '../../../util/permanentWebVersion';
|
|||||||
import { clearWebsync } from '../../../util/websync';
|
import { clearWebsync } from '../../../util/websync';
|
||||||
import {
|
import {
|
||||||
selectCanSetPasscode,
|
selectCanSetPasscode,
|
||||||
selectCurrentMessageList, selectIsCurrentUserPremium, selectTabState, selectTheme,
|
selectCurrentMessageList,
|
||||||
|
selectIsCurrentUserPremium,
|
||||||
|
selectTabState,
|
||||||
|
selectTheme,
|
||||||
} from '../../../global/selectors';
|
} from '../../../global/selectors';
|
||||||
import useLang from '../../../hooks/useLang';
|
import useLang from '../../../hooks/useLang';
|
||||||
import useConnectionStatus from '../../../hooks/useConnectionStatus';
|
import useConnectionStatus from '../../../hooks/useConnectionStatus';
|
||||||
@ -93,6 +96,8 @@ type StateProps =
|
|||||||
& Pick<GlobalState, 'connectionState' | 'isSyncing' | 'archiveSettings'>
|
& Pick<GlobalState, 'connectionState' | 'isSyncing' | 'archiveSettings'>
|
||||||
& Pick<TabState, 'canInstall'>;
|
& Pick<TabState, 'canInstall'>;
|
||||||
|
|
||||||
|
const CLEAR_DATE_SEARCH_PARAM = { date: undefined };
|
||||||
|
const CLEAR_CHAT_SEARCH_PARAM = { id: undefined };
|
||||||
const WEBK_VERSION_URL = 'https://web.telegram.org/k/';
|
const WEBK_VERSION_URL = 'https://web.telegram.org/k/';
|
||||||
|
|
||||||
const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||||
@ -140,8 +145,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
const lang = useLang();
|
const lang = useLang();
|
||||||
const { isMobile } = useAppLayout();
|
const { isMobile } = useAppLayout();
|
||||||
const hasMenu = content === LeftColumnContent.ChatList;
|
const hasMenu = content === LeftColumnContent.ChatList;
|
||||||
const clearedDateSearchParam = { date: undefined };
|
|
||||||
const clearedChatSearchParam = { id: undefined };
|
|
||||||
const selectedSearchDate = useMemo(() => {
|
const selectedSearchDate = useMemo(() => {
|
||||||
return searchDate
|
return searchDate
|
||||||
? formatDateToString(new Date(searchDate * 1000))
|
? formatDateToString(new Date(searchDate * 1000))
|
||||||
@ -378,6 +381,32 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
onSelectArchived, onSelectContacts, onSelectSettings, theme, withOtherVersions, archiveSettings,
|
onSelectArchived, onSelectContacts, onSelectSettings, theme, withOtherVersions, archiveSettings,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const searchContent = useMemo(() => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{selectedSearchDate && (
|
||||||
|
<PickerSelectedItem
|
||||||
|
icon="calendar"
|
||||||
|
title={selectedSearchDate}
|
||||||
|
canClose
|
||||||
|
isMinimized={Boolean(globalSearchChatId)}
|
||||||
|
className="search-date"
|
||||||
|
onClick={setGlobalSearchDate}
|
||||||
|
clickArg={CLEAR_DATE_SEARCH_PARAM}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{globalSearchChatId && (
|
||||||
|
<PickerSelectedItem
|
||||||
|
chatOrUserId={globalSearchChatId}
|
||||||
|
onClick={setGlobalSearchChatId}
|
||||||
|
canClose
|
||||||
|
clickArg={CLEAR_CHAT_SEARCH_PARAM}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}, [globalSearchChatId, selectedSearchDate]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="LeftMainHeader">
|
<div className="LeftMainHeader">
|
||||||
<div id="LeftMainHeader" className="left-header" ref={headerRef}>
|
<div id="LeftMainHeader" className="left-header" ref={headerRef}>
|
||||||
@ -417,25 +446,7 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
onFocus={handleSearchFocus}
|
onFocus={handleSearchFocus}
|
||||||
onSpinnerClick={connectionStatusPosition === 'minimized' ? toggleConnectionStatus : undefined}
|
onSpinnerClick={connectionStatusPosition === 'minimized' ? toggleConnectionStatus : undefined}
|
||||||
>
|
>
|
||||||
{selectedSearchDate && (
|
{searchContent}
|
||||||
<PickerSelectedItem
|
|
||||||
icon="calendar"
|
|
||||||
title={selectedSearchDate}
|
|
||||||
canClose
|
|
||||||
isMinimized={Boolean(globalSearchChatId)}
|
|
||||||
className="search-date"
|
|
||||||
onClick={setGlobalSearchDate}
|
|
||||||
clickArg={clearedDateSearchParam}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{globalSearchChatId && (
|
|
||||||
<PickerSelectedItem
|
|
||||||
chatOrUserId={globalSearchChatId}
|
|
||||||
onClick={setGlobalSearchChatId}
|
|
||||||
canClose
|
|
||||||
clickArg={clearedChatSearchParam}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</SearchInput>
|
</SearchInput>
|
||||||
{isCurrentUserPremium && <StatusButton />}
|
{isCurrentUserPremium && <StatusButton />}
|
||||||
{hasPasscode && (
|
{hasPasscode && (
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import React, { memo } from '../../../lib/teact/teact';
|
|
||||||
|
|
||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './StatusPickerMenu';
|
import type { OwnProps } from './StatusPickerMenu';
|
||||||
|
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
@ -15,4 +14,4 @@ const StatusPickerMenuAsync: FC<OwnProps> = (props) => {
|
|||||||
return StatusPickerMenu ? <StatusPickerMenu {...props} /> : undefined;
|
return StatusPickerMenu ? <StatusPickerMenu {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(StatusPickerMenuAsync);
|
export default StatusPickerMenuAsync;
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import { ChatAnimationTypes } from './useChatAnimationType';
|
|||||||
import MessageSummary from '../../../common/MessageSummary';
|
import MessageSummary from '../../../common/MessageSummary';
|
||||||
import ChatForumLastMessage from '../../../common/ChatForumLastMessage';
|
import ChatForumLastMessage from '../../../common/ChatForumLastMessage';
|
||||||
import TypingStatus from '../../../common/TypingStatus';
|
import TypingStatus from '../../../common/TypingStatus';
|
||||||
|
import useLastCallback from '../../../../hooks/useLastCallback';
|
||||||
|
|
||||||
const ANIMATION_DURATION = 200;
|
const ANIMATION_DURATION = 200;
|
||||||
|
|
||||||
@ -89,21 +90,7 @@ export default function useChatListEntry({
|
|||||||
return actionTargetUserIds.map((userId) => usersById[userId]).filter(Boolean);
|
return actionTargetUserIds.map((userId) => usersById[userId]).filter(Boolean);
|
||||||
}, [actionTargetUserIds]);
|
}, [actionTargetUserIds]);
|
||||||
|
|
||||||
function renderSubtitle() {
|
const renderLastMessageOrTyping = useLastCallback(() => {
|
||||||
if (chat?.isForum && !isTopic) {
|
|
||||||
return (
|
|
||||||
<ChatForumLastMessage
|
|
||||||
chat={chat}
|
|
||||||
renderLastMessage={renderLastMessageOrTyping}
|
|
||||||
observeIntersection={observeIntersection}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return renderLastMessageOrTyping();
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderLastMessageOrTyping() {
|
|
||||||
if (typingStatus && lastMessage && typingStatus.timestamp > lastMessage.date * 1000) {
|
if (typingStatus && lastMessage && typingStatus.timestamp > lastMessage.date * 1000) {
|
||||||
return <TypingStatus typingStatus={typingStatus} />;
|
return <TypingStatus typingStatus={typingStatus} />;
|
||||||
}
|
}
|
||||||
@ -161,6 +148,20 @@ export default function useChatListEntry({
|
|||||||
{renderSummary(lang, lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)}
|
{renderSummary(lang, lastMessage, observeIntersection, mediaBlobUrl || mediaThumbnail, isRoundVideo)}
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
function renderSubtitle() {
|
||||||
|
if (chat?.isForum && !isTopic) {
|
||||||
|
return (
|
||||||
|
<ChatForumLastMessage
|
||||||
|
chat={chat}
|
||||||
|
renderLastMessage={renderLastMessageOrTyping}
|
||||||
|
observeIntersection={observeIntersection}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return renderLastMessageOrTyping();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets animation excess values when `orderDiff` changes and then resets excess values to animate
|
// Sets animation excess values when `orderDiff` changes and then resets excess values to animate
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './NewChat';
|
import type { OwnProps } from './NewChat';
|
||||||
@ -14,4 +14,4 @@ const NewChatAsync: FC<OwnProps> = (props) => {
|
|||||||
return NewChat ? <NewChat {...props} /> : <Loading />;
|
return NewChat ? <NewChat {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NewChatAsync);
|
export default NewChatAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './NewChatStep1';
|
import type { OwnProps } from './NewChatStep1';
|
||||||
@ -14,4 +14,4 @@ const NewChatStep1Async: FC<OwnProps> = (props) => {
|
|||||||
return NewChatStep1 ? <NewChatStep1 {...props} /> : <Loading />;
|
return NewChatStep1 ? <NewChatStep1 {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NewChatStep1Async);
|
export default NewChatStep1Async;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './NewChatStep2';
|
import type { OwnProps } from './NewChatStep2';
|
||||||
@ -14,4 +14,4 @@ const NewChatStep2Async: FC<OwnProps> = (props) => {
|
|||||||
return NewChatStep2 ? <NewChatStep2 {...props} /> : <Loading />;
|
return NewChatStep2 ? <NewChatStep2 {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NewChatStep2Async);
|
export default NewChatStep2Async;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
import type { OwnProps } from './LeftSearch';
|
import type { OwnProps } from './LeftSearch';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const LeftSearchAsync: FC<OwnProps> = (props) => {
|
|||||||
return LeftSearch ? <LeftSearch {...props} /> : <Loading />;
|
return LeftSearch ? <LeftSearch {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(LeftSearchAsync);
|
export default LeftSearchAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './Settings';
|
import type { OwnProps } from './Settings';
|
||||||
@ -14,4 +14,4 @@ const SettingsAsync: FC<OwnProps> = (props) => {
|
|||||||
return Settings ? <Settings {...props} /> : <Loading />;
|
return Settings ? <Settings {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SettingsAsync);
|
export default SettingsAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './AttachBotInstallModal';
|
import type { OwnProps } from './AttachBotInstallModal';
|
||||||
@ -14,4 +14,4 @@ const AttachBotInstallModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return AttachBotInstallModal ? <AttachBotInstallModal {...props} /> : undefined;
|
return AttachBotInstallModal ? <AttachBotInstallModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AttachBotInstallModalAsync);
|
export default AttachBotInstallModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './AttachBotRecipientPicker';
|
import type { OwnProps } from './AttachBotRecipientPicker';
|
||||||
|
|
||||||
@ -15,4 +15,4 @@ const AttachBotRecipientPickerAsync: FC<OwnProps> = (props) => {
|
|||||||
return AttachBotRecipientPicker ? <AttachBotRecipientPicker {...props} /> : undefined;
|
return AttachBotRecipientPicker ? <AttachBotRecipientPicker {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AttachBotRecipientPickerAsync);
|
export default AttachBotRecipientPickerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './BotTrustModal';
|
import type { OwnProps } from './BotTrustModal';
|
||||||
@ -14,4 +14,4 @@ const BotTrustModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return BotTrustModal ? <BotTrustModal {...props} /> : undefined;
|
return BotTrustModal ? <BotTrustModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(BotTrustModalAsync);
|
export default BotTrustModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './DeleteFolderDialog';
|
import type { OwnProps } from './DeleteFolderDialog';
|
||||||
@ -14,4 +14,4 @@ const DeleteFolderDialogAsync: FC<OwnProps> = (props) => {
|
|||||||
return DeleteFolderDialog ? <DeleteFolderDialog {...props} /> : undefined;
|
return DeleteFolderDialog ? <DeleteFolderDialog {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(DeleteFolderDialogAsync);
|
export default DeleteFolderDialogAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const DialogsAsync: FC = ({ isOpen }) => {
|
|||||||
return Dialogs ? <Dialogs /> : undefined;
|
return Dialogs ? <Dialogs /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(DialogsAsync);
|
export default DialogsAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './DraftRecipientPicker';
|
import type { OwnProps } from './DraftRecipientPicker';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const DraftRecipientPickerAsync: FC<OwnProps> = (props) => {
|
|||||||
return DraftRecipientPicker ? <DraftRecipientPicker {...props} /> : undefined;
|
return DraftRecipientPicker ? <DraftRecipientPicker {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(DraftRecipientPickerAsync);
|
export default DraftRecipientPickerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './ForwardRecipientPicker';
|
import type { OwnProps } from './ForwardRecipientPicker';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ForwardRecipientPickerAsync: FC<OwnProps> = (props) => {
|
|||||||
return ForwardRecipientPicker ? <ForwardRecipientPicker {...props} /> : undefined;
|
return ForwardRecipientPicker ? <ForwardRecipientPicker {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ForwardRecipientPickerAsync);
|
export default ForwardRecipientPickerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './HistoryCalendar';
|
import type { OwnProps } from './HistoryCalendar';
|
||||||
@ -14,4 +14,4 @@ const HistoryCalendarAsync: FC<OwnProps> = (props) => {
|
|||||||
return HistoryCalendar ? <HistoryCalendar {...props} /> : undefined;
|
return HistoryCalendar ? <HistoryCalendar {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(HistoryCalendarAsync);
|
export default HistoryCalendarAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './LockScreen';
|
import type { OwnProps } from './LockScreen';
|
||||||
@ -14,4 +14,4 @@ const LockScreenAsync: FC<OwnProps> = (props) => {
|
|||||||
return LockScreen ? <LockScreen {...props} /> : undefined;
|
return LockScreen ? <LockScreen {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(LockScreenAsync);
|
export default LockScreenAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './Main';
|
import type { OwnProps } from './Main';
|
||||||
@ -13,4 +13,4 @@ const MainAsync: FC<OwnProps> = (props) => {
|
|||||||
return Main ? <Main {...props} /> : undefined;
|
return Main ? <Main {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MainAsync);
|
export default MainAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './NewContactModal';
|
import type { OwnProps } from './NewContactModal';
|
||||||
@ -14,4 +14,4 @@ const NewContactModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return NewContactModal ? <NewContactModal {...props} /> : undefined;
|
return NewContactModal ? <NewContactModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NewContactModalAsync);
|
export default NewContactModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const NotificationsAsync: FC = ({ isOpen }) => {
|
|||||||
return Notifications ? <Notifications /> : undefined;
|
return Notifications ? <Notifications /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(NotificationsAsync);
|
export default NotificationsAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './SafeLinkModal';
|
import type { OwnProps } from './SafeLinkModal';
|
||||||
@ -14,4 +14,4 @@ const SafeLinkModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return SafeLinkModal ? <SafeLinkModal {...props} /> : undefined;
|
return SafeLinkModal ? <SafeLinkModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SafeLinkModalAsync);
|
export default SafeLinkModalAsync;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import React, { memo } from '../../lib/teact/teact';
|
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
|
||||||
|
|
||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
|
import React from '../../lib/teact/teact';
|
||||||
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './UrlAuthModal';
|
import type { OwnProps } from './UrlAuthModal';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -14,4 +13,4 @@ const UrlAuthModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return UrlAuthModal ? <UrlAuthModal {...props} /> : undefined;
|
return UrlAuthModal ? <UrlAuthModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(UrlAuthModalAsync);
|
export default UrlAuthModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './WebAppModal';
|
import type { OwnProps } from './WebAppModal';
|
||||||
@ -14,4 +14,4 @@ const WebAppModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return WebAppModal ? <WebAppModal {...props} /> : undefined;
|
return WebAppModal ? <WebAppModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(WebAppModalAsync);
|
export default WebAppModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './GiftPremiumModal';
|
import type { OwnProps } from './GiftPremiumModal';
|
||||||
@ -14,4 +14,4 @@ const GiftPremiumModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return GiftPremiumModal ? <GiftPremiumModal {...props} /> : undefined;
|
return GiftPremiumModal ? <GiftPremiumModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(GiftPremiumModalAsync);
|
export default GiftPremiumModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './PremiumMainModal';
|
import type { OwnProps } from './PremiumMainModal';
|
||||||
@ -14,4 +14,4 @@ const PremiumMainModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return PremiumMainModal ? <PremiumMainModal {...props} /> : undefined;
|
return PremiumMainModal ? <PremiumMainModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PremiumMainModalAsync);
|
export default PremiumMainModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../../lib/teact/teact';
|
import type { FC } from '../../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../../lib/teact/teact';
|
import React from '../../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../../util/moduleLoader';
|
import { Bundles } from '../../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './PremiumLimitReachedModal';
|
import type { OwnProps } from './PremiumLimitReachedModal';
|
||||||
@ -14,4 +14,4 @@ const PremiumLimitReachedModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return PremiumLimitReachedModal ? <PremiumLimitReachedModal {...props} /> : undefined;
|
return PremiumLimitReachedModal ? <PremiumLimitReachedModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PremiumLimitReachedModalAsync);
|
export default PremiumLimitReachedModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
|
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -14,4 +14,4 @@ const MediaViewerAsync: FC<OwnProps> = ({ isOpen }) => {
|
|||||||
return MediaViewer ? <MediaViewer /> : undefined;
|
return MediaViewer ? <MediaViewer /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MediaViewerAsync);
|
export default MediaViewerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './EmojiInteractionAnimation';
|
import type { OwnProps } from './EmojiInteractionAnimation';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -15,4 +15,4 @@ const EmojiInteractionAnimationAsync: FC<OwnProps> = (props) => {
|
|||||||
return EmojiInteractionAnimation ? <EmojiInteractionAnimation {...props} /> : undefined;
|
return EmojiInteractionAnimation ? <EmojiInteractionAnimation {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(EmojiInteractionAnimationAsync);
|
export default EmojiInteractionAnimationAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './HeaderMenuContainer';
|
import type { OwnProps } from './HeaderMenuContainer';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const HeaderMenuContainerAsync: FC<OwnProps> = (props) => {
|
|||||||
return HeaderMenuContainer ? <HeaderMenuContainer {...props} /> : undefined;
|
return HeaderMenuContainer ? <HeaderMenuContainer {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(HeaderMenuContainerAsync);
|
export default HeaderMenuContainerAsync;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import React, { memo } from '../../lib/teact/teact';
|
|
||||||
|
|
||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './MessageLanguageModal';
|
import type { OwnProps } from './MessageLanguageModal';
|
||||||
|
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
@ -14,4 +13,4 @@ const MessageLanguageModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return MessageLanguageModal ? <MessageLanguageModal {...props} /> : undefined;
|
return MessageLanguageModal ? <MessageLanguageModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MessageLanguageModalAsync);
|
export default MessageLanguageModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
import type { OwnProps } from './MessageSelectToolbar';
|
import type { OwnProps } from './MessageSelectToolbar';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const MessageSelectToolbarAsync: FC<OwnProps> = (props) => {
|
|||||||
return MessageSelectToolbar ? <MessageSelectToolbar {...props} /> : undefined;
|
return MessageSelectToolbar ? <MessageSelectToolbar {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MessageSelectToolbarAsync);
|
export default MessageSelectToolbarAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './MobileSearch';
|
import type { OwnProps } from './MobileSearch';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const MobileSearchAsync: FC<OwnProps> = (props) => {
|
|||||||
return MobileSearch ? <MobileSearch {...props} /> : undefined;
|
return MobileSearch ? <MobileSearch {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MobileSearchAsync);
|
export default MobileSearchAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './ReactorListModal';
|
import type { OwnProps } from './ReactorListModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ReactorListModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return ReactorListModal ? <ReactorListModal {...props} /> : undefined;
|
return ReactorListModal ? <ReactorListModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ReactorListModalAsync);
|
export default ReactorListModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './AttachmentModal';
|
import type { OwnProps } from './AttachmentModal';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const AttachmentModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return AttachmentModal ? <AttachmentModal {...props} /> : undefined;
|
return AttachmentModal ? <AttachmentModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(AttachmentModalAsync);
|
export default AttachmentModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './BotCommandMenu';
|
import type { OwnProps } from './BotCommandMenu';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const BotCommandMenuAsync: FC<OwnProps> = (props) => {
|
|||||||
return BotCommandMenu ? <BotCommandMenu {...props} /> : undefined;
|
return BotCommandMenu ? <BotCommandMenu {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(BotCommandMenuAsync);
|
export default BotCommandMenuAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './BotCommandTooltip';
|
import type { OwnProps } from './BotCommandTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const BotCommandTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return BotCommandTooltip ? <BotCommandTooltip {...props} /> : undefined;
|
return BotCommandTooltip ? <BotCommandTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(BotCommandTooltipAsync);
|
export default BotCommandTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './CustomEmojiTooltip';
|
import type { OwnProps } from './CustomEmojiTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const CustomEmojiTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return CustomEmojiTooltip ? <CustomEmojiTooltip {...props} /> : undefined;
|
return CustomEmojiTooltip ? <CustomEmojiTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(CustomEmojiTooltipAsync);
|
export default CustomEmojiTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './CustomSendMenu';
|
import type { OwnProps } from './CustomSendMenu';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const CustomSendMenuAsync: FC<OwnProps> = (props) => {
|
|||||||
return CustomSend ? <CustomSend {...props} /> : undefined;
|
return CustomSend ? <CustomSend {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(CustomSendMenuAsync);
|
export default CustomSendMenuAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './DropArea';
|
import type { OwnProps } from './DropArea';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,5 +13,5 @@ const DropAreaAsync: FC<OwnProps> = (props) => {
|
|||||||
return DropArea ? <DropArea {...props} /> : undefined;
|
return DropArea ? <DropArea {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(DropAreaAsync);
|
export default DropAreaAsync;
|
||||||
export { DropAreaState } from './DropArea';
|
export { DropAreaState } from './DropArea';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './EmojiTooltip';
|
import type { OwnProps } from './EmojiTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const EmojiTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return EmojiTooltip ? <EmojiTooltip {...props} /> : undefined;
|
return EmojiTooltip ? <EmojiTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(EmojiTooltipAsync);
|
export default EmojiTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './InlineBotTooltip';
|
import type { OwnProps } from './InlineBotTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const InlineBotTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return InlineBotTooltip ? <InlineBotTooltip {...props} /> : undefined;
|
return InlineBotTooltip ? <InlineBotTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(InlineBotTooltipAsync);
|
export default InlineBotTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './MentionTooltip';
|
import type { OwnProps } from './MentionTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const MentionTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return MentionTooltip ? <MentionTooltip {...props} /> : undefined;
|
return MentionTooltip ? <MentionTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(MentionTooltipAsync);
|
export default MentionTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './PollModal';
|
import type { OwnProps } from './PollModal';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const PollModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return PollModal ? <PollModal {...props} /> : undefined;
|
return PollModal ? <PollModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PollModalAsync);
|
export default PollModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './SendAsMenu';
|
import type { OwnProps } from './SendAsMenu';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const SendAsMenuAsync: FC<OwnProps> = (props) => {
|
|||||||
return SendAsMenu ? <SendAsMenu {...props} /> : undefined;
|
return SendAsMenu ? <SendAsMenu {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SendAsMenuAsync);
|
export default SendAsMenuAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './StickerTooltip';
|
import type { OwnProps } from './StickerTooltip';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const StickerTooltipAsync: FC<OwnProps> = (props) => {
|
|||||||
return StickerTooltip ? <StickerTooltip {...props} /> : undefined;
|
return StickerTooltip ? <StickerTooltip {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(StickerTooltipAsync);
|
export default StickerTooltipAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './SymbolMenu';
|
import type { OwnProps } from './SymbolMenu';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const SymbolMenuAsync: FC<OwnProps> = (props) => {
|
|||||||
return SymbolMenu ? <SymbolMenu {...props} /> : undefined;
|
return SymbolMenu ? <SymbolMenu {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SymbolMenuAsync);
|
export default SymbolMenuAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './TextFormatter';
|
import type { OwnProps } from './TextFormatter';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const TextFormatterAsync: FC<OwnProps> = (props) => {
|
|||||||
return TextFormatter ? <TextFormatter {...props} /> : undefined;
|
return TextFormatter ? <TextFormatter {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(TextFormatterAsync);
|
export default TextFormatterAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './ContextMenuContainer';
|
import type { OwnProps } from './ContextMenuContainer';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
|||||||
return ContextMenuContainer ? <ContextMenuContainer {...props} /> : undefined;
|
return ContextMenuContainer ? <ContextMenuContainer {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ContextMenuContainerAsync);
|
export default ContextMenuContainerAsync;
|
||||||
|
|||||||
@ -1,93 +1,92 @@
|
|||||||
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, {
|
import React, {
|
||||||
memo,
|
memo, useEffect, useMemo, useRef, useState,
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from '../../../lib/teact/teact';
|
} from '../../../lib/teact/teact';
|
||||||
import { getActions, withGlobal } from '../../../global';
|
import { getActions, withGlobal } from '../../../global';
|
||||||
|
|
||||||
import type { FC } from '../../../lib/teact/teact';
|
|
||||||
import type {
|
import type {
|
||||||
ActiveEmojiInteraction, ActiveReaction, ChatTranslatedMessages, MessageListType,
|
ActiveEmojiInteraction,
|
||||||
|
ActiveReaction,
|
||||||
|
ChatTranslatedMessages,
|
||||||
|
MessageListType,
|
||||||
} from '../../../global/types';
|
} from '../../../global/types';
|
||||||
import type {
|
import type {
|
||||||
|
ApiAvailableReaction,
|
||||||
|
ApiChat,
|
||||||
|
ApiChatMember,
|
||||||
ApiMessage,
|
ApiMessage,
|
||||||
ApiMessageOutgoingStatus,
|
ApiMessageOutgoingStatus,
|
||||||
ApiUser,
|
|
||||||
ApiChat,
|
|
||||||
ApiThreadInfo,
|
|
||||||
ApiAvailableReaction,
|
|
||||||
ApiChatMember,
|
|
||||||
ApiUsername,
|
|
||||||
ApiTopic,
|
|
||||||
ApiReaction,
|
ApiReaction,
|
||||||
ApiStickerSet,
|
ApiStickerSet,
|
||||||
|
ApiThreadInfo,
|
||||||
|
ApiTopic,
|
||||||
|
ApiUser,
|
||||||
|
ApiUsername,
|
||||||
} from '../../../api/types';
|
} from '../../../api/types';
|
||||||
import type { FocusDirection, IAlbum, ISettings } from '../../../types';
|
|
||||||
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
|
||||||
import type { PinnedIntersectionChangedCallback } from '../hooks/usePinnedMessage';
|
|
||||||
import { AudioOrigin } from '../../../types';
|
|
||||||
import { MAIN_THREAD_ID } from '../../../api/types';
|
import { MAIN_THREAD_ID } from '../../../api/types';
|
||||||
|
import type { FocusDirection, IAlbum, ISettings } from '../../../types';
|
||||||
|
import { AudioOrigin } from '../../../types';
|
||||||
|
import type { ObserveFn } from '../../../hooks/useIntersectionObserver';
|
||||||
|
import { useOnIntersect } from '../../../hooks/useIntersectionObserver';
|
||||||
|
import type { PinnedIntersectionChangedCallback } from '../hooks/usePinnedMessage';
|
||||||
|
|
||||||
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
import { IS_ANDROID, IS_TOUCH_ENV } from '../../../util/windowEnvironment';
|
||||||
import { EMOJI_STATUS_LOOP_LIMIT, GENERAL_TOPIC_ID, IS_ELECTRON } from '../../../config';
|
import { EMOJI_STATUS_LOOP_LIMIT, GENERAL_TOPIC_ID, IS_ELECTRON } from '../../../config';
|
||||||
import {
|
import {
|
||||||
selectChat,
|
selectAllowedMessageActions,
|
||||||
selectChatMessage,
|
selectAnimatedEmoji,
|
||||||
selectUploadProgress,
|
|
||||||
selectIsChatWithSelf,
|
|
||||||
selectOutgoingStatus,
|
|
||||||
selectUser,
|
|
||||||
selectIsMessageFocused,
|
|
||||||
selectCurrentTextSearch,
|
|
||||||
selectIsInSelectMode,
|
|
||||||
selectIsMessageSelected,
|
|
||||||
selectIsDocumentGroupSelected,
|
|
||||||
selectSender,
|
|
||||||
selectForwardedSender,
|
|
||||||
selectThreadTopMessageId,
|
|
||||||
selectCanAutoLoadMedia,
|
selectCanAutoLoadMedia,
|
||||||
selectCanAutoPlayMedia,
|
selectCanAutoPlayMedia,
|
||||||
selectShouldLoopStickers,
|
selectChat,
|
||||||
selectTheme,
|
|
||||||
selectAllowedMessageActions,
|
|
||||||
selectIsDownloading,
|
|
||||||
selectThreadInfo,
|
|
||||||
selectMessageIdsByGroupId,
|
|
||||||
selectIsMessageProtected,
|
|
||||||
selectDefaultReaction,
|
|
||||||
selectReplySender,
|
|
||||||
selectAnimatedEmoji,
|
|
||||||
selectIsCurrentUserPremium,
|
|
||||||
selectIsChatProtected,
|
|
||||||
selectTopicFromMessage,
|
|
||||||
selectTabState,
|
|
||||||
selectChatTranslations,
|
|
||||||
selectRequestedTranslationLanguage,
|
|
||||||
selectChatFullInfo,
|
selectChatFullInfo,
|
||||||
|
selectChatMessage,
|
||||||
|
selectChatTranslations,
|
||||||
|
selectCurrentTextSearch,
|
||||||
|
selectDefaultReaction,
|
||||||
|
selectForwardedSender,
|
||||||
|
selectIsChatProtected,
|
||||||
|
selectIsChatWithSelf,
|
||||||
|
selectIsCurrentUserPremium,
|
||||||
|
selectIsDocumentGroupSelected,
|
||||||
|
selectIsDownloading,
|
||||||
|
selectIsInSelectMode,
|
||||||
|
selectIsMessageFocused,
|
||||||
|
selectIsMessageProtected,
|
||||||
|
selectIsMessageSelected,
|
||||||
|
selectMessageIdsByGroupId,
|
||||||
|
selectOutgoingStatus,
|
||||||
selectPerformanceSettingsValue,
|
selectPerformanceSettingsValue,
|
||||||
|
selectReplySender,
|
||||||
|
selectRequestedTranslationLanguage,
|
||||||
|
selectSender,
|
||||||
|
selectShouldLoopStickers,
|
||||||
|
selectTabState,
|
||||||
|
selectTheme,
|
||||||
|
selectThreadInfo,
|
||||||
|
selectThreadTopMessageId,
|
||||||
|
selectTopicFromMessage,
|
||||||
|
selectUploadProgress,
|
||||||
|
selectUser,
|
||||||
} from '../../../global/selectors';
|
} from '../../../global/selectors';
|
||||||
import {
|
import {
|
||||||
|
areReactionsEmpty,
|
||||||
getMessageContent,
|
getMessageContent,
|
||||||
isOwnMessage,
|
|
||||||
isReplyMessage,
|
|
||||||
isAnonymousOwnMessage,
|
|
||||||
isMessageLocal,
|
|
||||||
isUserId,
|
|
||||||
isChatWithRepliesBot,
|
|
||||||
getMessageCustomShape,
|
getMessageCustomShape,
|
||||||
isChatChannel,
|
getMessageHtmlId,
|
||||||
|
getMessageLocation,
|
||||||
|
getMessageSingleCustomEmoji,
|
||||||
getMessageSingleRegularEmoji,
|
getMessageSingleRegularEmoji,
|
||||||
getSenderTitle,
|
getSenderTitle,
|
||||||
getUserColorKey,
|
getUserColorKey,
|
||||||
areReactionsEmpty,
|
|
||||||
getMessageHtmlId,
|
|
||||||
isGeoLiveExpired,
|
|
||||||
getMessageSingleCustomEmoji,
|
|
||||||
hasMessageText,
|
hasMessageText,
|
||||||
|
isAnonymousOwnMessage,
|
||||||
|
isChatChannel,
|
||||||
isChatGroup,
|
isChatGroup,
|
||||||
getMessageLocation,
|
isChatWithRepliesBot,
|
||||||
|
isGeoLiveExpired,
|
||||||
|
isMessageLocal,
|
||||||
|
isOwnMessage,
|
||||||
|
isReplyMessage,
|
||||||
|
isUserId,
|
||||||
} from '../../../global/helpers';
|
} from '../../../global/helpers';
|
||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
import {
|
import {
|
||||||
@ -98,8 +97,8 @@ import {
|
|||||||
} from '../../common/helpers/mediaDimensions';
|
} from '../../common/helpers/mediaDimensions';
|
||||||
import { buildContentClassName } from './helpers/buildContentClassName';
|
import { buildContentClassName } from './helpers/buildContentClassName';
|
||||||
import {
|
import {
|
||||||
getMinMediaWidth,
|
|
||||||
calculateMediaDimensions,
|
calculateMediaDimensions,
|
||||||
|
getMinMediaWidth,
|
||||||
MIN_MEDIA_WIDTH_WITH_TEXT,
|
MIN_MEDIA_WIDTH_WITH_TEXT,
|
||||||
} from './helpers/mediaDimensions';
|
} from './helpers/mediaDimensions';
|
||||||
import { calculateAlbumLayout } from './helpers/calculateAlbumLayout';
|
import { calculateAlbumLayout } from './helpers/calculateAlbumLayout';
|
||||||
@ -112,7 +111,6 @@ import { isAnimatingScroll } from '../../../util/animateScroll';
|
|||||||
import useLastCallback from '../../../hooks/useLastCallback';
|
import useLastCallback from '../../../hooks/useLastCallback';
|
||||||
import useEnsureMessage from '../../../hooks/useEnsureMessage';
|
import useEnsureMessage from '../../../hooks/useEnsureMessage';
|
||||||
import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers';
|
import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers';
|
||||||
import { useOnIntersect } from '../../../hooks/useIntersectionObserver';
|
|
||||||
import useLang from '../../../hooks/useLang';
|
import useLang from '../../../hooks/useLang';
|
||||||
import useShowTransition from '../../../hooks/useShowTransition';
|
import useShowTransition from '../../../hooks/useShowTransition';
|
||||||
import useFlag from '../../../hooks/useFlag';
|
import useFlag from '../../../hooks/useFlag';
|
||||||
@ -802,7 +800,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderQuickReactionButton() {
|
const renderQuickReactionButton = useLastCallback(() => {
|
||||||
if (!defaultReaction) return undefined;
|
if (!defaultReaction) return undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -819,7 +817,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
|
|
||||||
function renderReactionsAndMeta() {
|
function renderReactionsAndMeta() {
|
||||||
const meta = (
|
const meta = (
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import React, { memo } from '../../../lib/teact/teact';
|
|
||||||
|
|
||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './ReactionPicker';
|
import type { OwnProps } from './ReactionPicker';
|
||||||
|
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
@ -18,4 +17,4 @@ const ReactionPickerAsync: FC<OwnProps & LocalOwnProps> = (props) => {
|
|||||||
return ReactionPicker ? <ReactionPicker {...props} /> : undefined;
|
return ReactionPicker ? <ReactionPicker {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ReactionPickerAsync);
|
export default ReactionPickerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import type { OwnProps } from './SponsoredMessageContextMenuContainer';
|
import type { OwnProps } from './SponsoredMessageContextMenuContainer';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
@ -15,4 +15,4 @@ const SponsoredMessageContextMenuContainerAsync: FC<OwnProps> = (props) => {
|
|||||||
return SponsoredMessageContextMenuContainer ? <SponsoredMessageContextMenuContainer {...props} /> : undefined;
|
return SponsoredMessageContextMenuContainer ? <SponsoredMessageContextMenuContainer {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(SponsoredMessageContextMenuContainerAsync);
|
export default SponsoredMessageContextMenuContainerAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './ChatlistModal';
|
import type { OwnProps } from './ChatlistModal';
|
||||||
@ -14,4 +14,4 @@ const ChatlistModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return ChatlistModal ? <ChatlistModal {...props} /> : undefined;
|
return ChatlistModal ? <ChatlistModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ChatlistModalAsync);
|
export default ChatlistModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './PaymentModal';
|
import type { OwnProps } from './PaymentModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const PaymentModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return PaymentModal ? <PaymentModal {...props} /> : undefined;
|
return PaymentModal ? <PaymentModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PaymentModalAsync);
|
export default PaymentModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './ReceiptModal';
|
import type { OwnProps } from './ReceiptModal';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const ReceiptModalAsync: FC<OwnProps> = (props) => {
|
|||||||
return ReceiptModal ? <ReceiptModal {...props} /> : undefined;
|
return ReceiptModal ? <ReceiptModal {...props} /> : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ReceiptModalAsync);
|
export default ReceiptModalAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React, { memo } from '../../lib/teact/teact';
|
|
||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './CreateTopic';
|
import type { OwnProps } from './CreateTopic';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const CreateTopicAsync: FC<OwnProps> = (props) => {
|
|||||||
return CreateTopic ? <CreateTopic {...props} /> : <Loading />;
|
return CreateTopic ? <CreateTopic {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(CreateTopicAsync);
|
export default CreateTopicAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import React, { memo } from '../../lib/teact/teact';
|
|
||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './EditTopic';
|
import type { OwnProps } from './EditTopic';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const EditTopicAsync: FC<OwnProps> = (props) => {
|
|||||||
return EditTopic ? <EditTopic {...props} /> : <Loading />;
|
return EditTopic ? <EditTopic {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(EditTopicAsync);
|
export default EditTopicAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -12,4 +12,4 @@ const GifSearchAsync: FC = () => {
|
|||||||
return GifSearch ? <GifSearch /> : <Loading />;
|
return GifSearch ? <GifSearch /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(GifSearchAsync);
|
export default GifSearchAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -11,4 +11,4 @@ const PollResultsAsync: FC = () => {
|
|||||||
return PollResults ? <PollResults /> : <Loading />;
|
return PollResults ? <PollResults /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(PollResultsAsync);
|
export default PollResultsAsync;
|
||||||
|
|||||||
@ -1,12 +1,10 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, {
|
import React, { useEffect, useRef, useState } from '../../lib/teact/teact';
|
||||||
memo, useEffect, useState, useRef,
|
|
||||||
} from '../../lib/teact/teact';
|
|
||||||
import { getActions, withGlobal } from '../../global';
|
import { getActions, withGlobal } from '../../global';
|
||||||
|
|
||||||
import type { ApiExportedInvite } from '../../api/types';
|
import type { ApiExportedInvite } from '../../api/types';
|
||||||
import { ManagementScreens, ProfileState } from '../../types';
|
|
||||||
import { MAIN_THREAD_ID } from '../../api/types';
|
import { MAIN_THREAD_ID } from '../../api/types';
|
||||||
|
import { ManagementScreens, ProfileState } from '../../types';
|
||||||
|
|
||||||
import { ANIMATION_END_DELAY } from '../../config';
|
import { ANIMATION_END_DELAY } from '../../config';
|
||||||
import { debounce } from '../../util/schedulers';
|
import { debounce } from '../../util/schedulers';
|
||||||
@ -544,7 +542,7 @@ const RightHeader: FC<OwnProps & StateProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(withGlobal<OwnProps>(
|
export default withGlobal<OwnProps>(
|
||||||
(global, {
|
(global, {
|
||||||
chatId, isProfile, isManagement, threadId,
|
chatId, isProfile, isManagement, threadId,
|
||||||
}): StateProps => {
|
}): StateProps => {
|
||||||
@ -587,4 +585,4 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
shouldSkipHistoryAnimations: tabState.shouldSkipHistoryAnimations,
|
shouldSkipHistoryAnimations: tabState.shouldSkipHistoryAnimations,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
)(RightHeader));
|
)(RightHeader);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import type { OwnProps } from './RightSearch';
|
import type { OwnProps } from './RightSearch';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
@ -13,4 +13,4 @@ const RightSearchAsync: FC<OwnProps> = (props) => {
|
|||||||
return RightSearch ? <RightSearch {...props} /> : <Loading />;
|
return RightSearch ? <RightSearch {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(RightSearchAsync);
|
export default RightSearchAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { memo } from '../../lib/teact/teact';
|
import React from '../../lib/teact/teact';
|
||||||
import { Bundles } from '../../util/moduleLoader';
|
import { Bundles } from '../../util/moduleLoader';
|
||||||
|
|
||||||
import useModuleLoader from '../../hooks/useModuleLoader';
|
import useModuleLoader from '../../hooks/useModuleLoader';
|
||||||
@ -12,4 +12,4 @@ const StickerSearchAsync: FC = () => {
|
|||||||
return StickerSearch ? <StickerSearch /> : <Loading />;
|
return StickerSearch ? <StickerSearch /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(StickerSearchAsync);
|
export default StickerSearchAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../../lib/teact/teact';
|
import type { FC } from '../../../lib/teact/teact';
|
||||||
import React, { memo } from '../../../lib/teact/teact';
|
import React from '../../../lib/teact/teact';
|
||||||
import { Bundles } from '../../../util/moduleLoader';
|
import { Bundles } from '../../../util/moduleLoader';
|
||||||
|
|
||||||
import type { OwnProps } from './Management';
|
import type { OwnProps } from './Management';
|
||||||
@ -15,4 +15,4 @@ const ManagementAsync: FC<OwnProps> = (props) => {
|
|||||||
return Management ? <Management {...props} /> : <Loading />;
|
return Management ? <Management {...props} /> : <Loading />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ManagementAsync);
|
export default ManagementAsync;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
import React, { useRef, memo } from '../../lib/teact/teact';
|
import React, { useRef } from '../../lib/teact/teact';
|
||||||
|
|
||||||
import type { OwnProps as ButtonProps } from './Button';
|
import type { OwnProps as ButtonProps } from './Button';
|
||||||
|
|
||||||
@ -65,4 +65,4 @@ const ResponsiveHoverButton: FC<OwnProps> = ({ onActivate, ...buttonProps }) =>
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(ResponsiveHoverButton);
|
export default ResponsiveHoverButton;
|
||||||
|
|||||||
@ -1,12 +1,6 @@
|
|||||||
import React, {
|
|
||||||
useRef,
|
|
||||||
memo,
|
|
||||||
useEffect,
|
|
||||||
useLayoutEffect,
|
|
||||||
} from '../../lib/teact/teact';
|
|
||||||
import { requestForcedReflow, requestMutation } from '../../lib/fasterdom/fasterdom';
|
|
||||||
|
|
||||||
import type { FC } from '../../lib/teact/teact';
|
import type { FC } from '../../lib/teact/teact';
|
||||||
|
import React, { useEffect, useLayoutEffect, useRef } from '../../lib/teact/teact';
|
||||||
|
import { requestForcedReflow, requestMutation } from '../../lib/fasterdom/fasterdom';
|
||||||
import type { MenuItemContextAction } from './ListItem';
|
import type { MenuItemContextAction } from './ListItem';
|
||||||
|
|
||||||
import { MouseButton } from '../../util/windowEnvironment';
|
import { MouseButton } from '../../util/windowEnvironment';
|
||||||
@ -16,13 +10,13 @@ import renderText from '../common/helpers/renderText';
|
|||||||
import useMenuPosition from '../../hooks/useMenuPosition';
|
import useMenuPosition from '../../hooks/useMenuPosition';
|
||||||
import useContextMenuHandlers from '../../hooks/useContextMenuHandlers';
|
import useContextMenuHandlers from '../../hooks/useContextMenuHandlers';
|
||||||
import { useFastClick } from '../../hooks/useFastClick';
|
import { useFastClick } from '../../hooks/useFastClick';
|
||||||
|
import useLastCallback from '../../hooks/useLastCallback';
|
||||||
|
|
||||||
import Menu from './Menu';
|
import Menu from './Menu';
|
||||||
import MenuItem from './MenuItem';
|
import MenuItem from './MenuItem';
|
||||||
|
|
||||||
import MenuSeparator from './MenuSeparator';
|
import MenuSeparator from './MenuSeparator';
|
||||||
|
|
||||||
import './Tab.scss';
|
import './Tab.scss';
|
||||||
import useLastCallback from '../../hooks/useLastCallback';
|
|
||||||
|
|
||||||
type OwnProps = {
|
type OwnProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -197,4 +191,4 @@ const Tab: FC<OwnProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default memo(Tab);
|
export default Tab;
|
||||||
|
|||||||
@ -801,7 +801,7 @@ export function useMemo<T extends any>(resolver: () => T, dependencies: any[], d
|
|||||||
if (
|
if (
|
||||||
DEBUG_state.calls % 10 === 0
|
DEBUG_state.calls % 10 === 0
|
||||||
&& DEBUG_state.calls >= DEBUG_MEMOS_CALLS_THRESHOLD
|
&& DEBUG_state.calls >= DEBUG_MEMOS_CALLS_THRESHOLD
|
||||||
&& DEBUG_state.hitRate < 0.5
|
&& DEBUG_state.hitRate < 0.25
|
||||||
) {
|
) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user