Main Menu: Remove "Switch to Old Version" button (#2653)
This commit is contained in:
parent
c624675e9f
commit
5348726f43
@ -81,7 +81,6 @@ type StateProps =
|
|||||||
& Pick<GlobalState, 'connectionState' | 'isSyncing'> & Pick<TabState, 'canInstall'>;
|
& Pick<GlobalState, 'connectionState' | 'isSyncing'> & Pick<TabState, 'canInstall'>;
|
||||||
|
|
||||||
const ANIMATION_LEVEL_OPTIONS = [0, 1, 2];
|
const ANIMATION_LEVEL_OPTIONS = [0, 1, 2];
|
||||||
const LEGACY_VERSION_URL = 'https://web.telegram.org/?legacy=1';
|
|
||||||
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> = ({
|
||||||
@ -237,10 +236,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
skipLockOnUnload();
|
skipLockOnUnload();
|
||||||
}, [skipLockOnUnload]);
|
}, [skipLockOnUnload]);
|
||||||
|
|
||||||
const handleSwitchToLegacy = useCallback(() => {
|
|
||||||
skipLockOnUnload();
|
|
||||||
}, [skipLockOnUnload]);
|
|
||||||
|
|
||||||
const handleOpenTipsChat = useCallback(() => {
|
const handleOpenTipsChat = useCallback(() => {
|
||||||
openChatByUsername({ username: lang('Settings.TipsUsername') });
|
openChatByUsername({ username: lang('Settings.TipsUsername') });
|
||||||
}, [lang, openChatByUsername]);
|
}, [lang, openChatByUsername]);
|
||||||
@ -346,22 +341,13 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
{withOtherVersions && (
|
{withOtherVersions && (
|
||||||
<>
|
<MenuItem
|
||||||
<MenuItem
|
icon="char-K"
|
||||||
icon="char-K"
|
href={WEBK_VERSION_URL}
|
||||||
href={WEBK_VERSION_URL}
|
onClick={handleSwitchToWebK}
|
||||||
onClick={handleSwitchToWebK}
|
>
|
||||||
>
|
Switch to K Version
|
||||||
Switch to K Version
|
</MenuItem>
|
||||||
</MenuItem>
|
|
||||||
<MenuItem
|
|
||||||
icon="char-W"
|
|
||||||
href={LEGACY_VERSION_URL}
|
|
||||||
onClick={handleSwitchToLegacy}
|
|
||||||
>
|
|
||||||
Switch to Old Version
|
|
||||||
</MenuItem>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{canInstall && (
|
{canInstall && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
@ -374,8 +360,8 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
</>
|
</>
|
||||||
), [
|
), [
|
||||||
animationLevel, archivedUnreadChatsCount, canInstall, handleAnimationLevelChange, handleBugReportClick,
|
animationLevel, archivedUnreadChatsCount, canInstall, handleAnimationLevelChange, handleBugReportClick,
|
||||||
handleChangelogClick, handleDarkModeToggle, handleOpenTipsChat, handleSelectSaved, handleSwitchToLegacy,
|
handleChangelogClick, handleDarkModeToggle, handleOpenTipsChat, handleSelectSaved, handleSwitchToWebK, lang,
|
||||||
handleSwitchToWebK, lang, onSelectArchived, onSelectContacts, onSelectSettings, theme, withOtherVersions,
|
onSelectArchived, onSelectContacts, onSelectSettings, theme, withOtherVersions,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user