diff --git a/src/components/left/ArchivedChats.tsx b/src/components/left/ArchivedChats.tsx index 3a04e65a9..b047a1061 100644 --- a/src/components/left/ArchivedChats.tsx +++ b/src/components/left/ArchivedChats.tsx @@ -134,6 +134,7 @@ const ArchivedChats: FC = ({ isMainList foldersDispatch={foldersDispatch} archiveSettings={archiveSettings} + isStoryRibbonShown={isStoryRibbonShown} /> {shouldRenderForumPanel && ( diff --git a/src/components/left/main/ChatFolders.tsx b/src/components/left/main/ChatFolders.tsx index 79fb4a93d..50337e72d 100644 --- a/src/components/left/main/ChatFolders.tsx +++ b/src/components/left/main/ChatFolders.tsx @@ -368,6 +368,7 @@ const ChatFolders: FC = ({ archiveSettings={archiveSettings} sessions={sessions} isAccountFrozen={isAccountFrozen} + isStoryRibbonShown={isStoryRibbonShown} withTags /> ); diff --git a/src/components/left/main/ChatList.tsx b/src/components/left/main/ChatList.tsx index 23b9ab2c1..28f8c3d3f 100644 --- a/src/components/left/main/ChatList.tsx +++ b/src/components/left/main/ChatList.tsx @@ -50,8 +50,9 @@ type OwnProps = { sessions?: Record; isAccountFrozen?: boolean; isMainList?: boolean; - foldersDispatch?: FolderEditDispatch; withTags?: boolean; + isStoryRibbonShown?: boolean; + foldersDispatch?: FolderEditDispatch; }; const INTERSECTION_THROTTLE = 200; @@ -68,8 +69,9 @@ const ChatList: FC = ({ sessions, isAccountFrozen, isMainList, - foldersDispatch, withTags, + isStoryRibbonShown, + foldersDispatch, }) => { const { openChat, @@ -203,6 +205,7 @@ const ChatList: FC = ({ onOverscroll: handleShowStoryRibbon, onReset: handleHideStoryRibbon, isDisabled: isSaved, + isOverscrolled: isStoryRibbonShown, }); function renderChats() { diff --git a/src/hooks/scroll/useTopOverscroll.tsx b/src/hooks/scroll/useTopOverscroll.tsx index c72600935..ea430a0f5 100644 --- a/src/hooks/scroll/useTopOverscroll.tsx +++ b/src/hooks/scroll/useTopOverscroll.tsx @@ -206,8 +206,12 @@ export default function useTopOverscroll({ }, [containerRef, isDisabled, getState]); useEffect(() => { + if (!isOverscrolled && getState() === 'animating') { + return; // We're animating towards this state + } + setState(isOverscrolled ? 'overscroll' : 'normal'); - }, [isOverscrolled, setState]); + }, [isOverscrolled, getState, setState]); useEffect(() => { const container = containerRef.current;