From 7be9f5373c6404c38674bfeb406d46b5cfcf4ece Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sun, 7 Aug 2022 21:16:08 +0200 Subject: [PATCH] Chat Folders: Fix translations (#1988) --- src/components/left/main/ChatFolders.tsx | 2 +- src/components/ui/TabList.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/left/main/ChatFolders.tsx b/src/components/left/main/ChatFolders.tsx index 2549afa0..5596e21c 100644 --- a/src/components/left/main/ChatFolders.tsx +++ b/src/components/left/main/ChatFolders.tsx @@ -223,7 +223,7 @@ const ChatFolders: FC = ({ return (
{shouldRenderFolders ? ( - + ) : shouldRenderPlaceholder ? (
) : undefined} diff --git a/src/components/ui/TabList.tsx b/src/components/ui/TabList.tsx index da075303..7cce76f1 100644 --- a/src/components/ui/TabList.tsx +++ b/src/components/ui/TabList.tsx @@ -1,8 +1,10 @@ import type { FC } from '../../lib/teact/teact'; import React, { memo, useRef, useEffect } from '../../lib/teact/teact'; +import { ALL_FOLDER_ID } from '../../config'; import { IS_ANDROID, IS_IOS } from '../../util/environment'; import fastSmoothScrollHorizontal from '../../util/fastSmoothScrollHorizontal'; + import usePrevious from '../../hooks/usePrevious'; import useHorizontalScroll from '../../hooks/useHorizontalScroll'; import useLang from '../../hooks/useLang'; @@ -21,6 +23,7 @@ export type TabWithProperties = { type OwnProps = { tabs: readonly TabWithProperties[]; + areFolders?: boolean; activeTab: number; big?: boolean; onSwitchTab: (index: number) => void; @@ -31,7 +34,7 @@ const TAB_SCROLL_THRESHOLD_PX = 16; const SCROLL_DURATION = IS_IOS ? 450 : IS_ANDROID ? 400 : 300; const TabList: FC = ({ - tabs, activeTab, big, onSwitchTab, + tabs, areFolders, activeTab, big, onSwitchTab, }) => { // eslint-disable-next-line no-null/no-null const containerRef = useRef(null); @@ -74,7 +77,8 @@ const TabList: FC = ({ {tabs.map((tab, i) => (