Ensure posts are not covered by the post draft on channel switch
This commit is contained in:
parent
58719c82dc
commit
c7c00b8316
1 changed files with 6 additions and 2 deletions
|
|
@ -116,8 +116,12 @@ const PostList = ({
|
|||
}, [orderedPosts]);
|
||||
|
||||
useEffect(() => {
|
||||
listRef.current?.scrollToOffset({offset: 0, animated: false});
|
||||
}, [channelId]);
|
||||
const t = setTimeout(() => {
|
||||
listRef.current?.scrollToOffset({offset: 0, animated: false});
|
||||
}, 200);
|
||||
|
||||
return () => clearTimeout(t);
|
||||
}, [channelId, rootId]);
|
||||
|
||||
useEffect(() => {
|
||||
const scrollToBottom = (screen: string) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue