fix: previous feed should not be preserved when switching feeds
Signed-off-by: Innei <i@innei.in>
This commit is contained in:
@@ -139,6 +139,10 @@ export const useEntriesByView = ({
|
||||
const [mergedEntries, setMergedEntries] = useState<string[]>([])
|
||||
|
||||
const entryIdsAsDeps = entryIds.toString()
|
||||
|
||||
useEffect(() => {
|
||||
prevEntryIdsRef.current = []
|
||||
}, [feedId])
|
||||
useEffect(() => {
|
||||
if (!prevEntryIdsRef.current) {
|
||||
prevEntryIdsRef.current = entryIds
|
||||
|
||||
@@ -70,7 +70,7 @@ export const EntryListHeader: FC<{
|
||||
<div
|
||||
ref={containerRef}
|
||||
className={cn(
|
||||
"mb-2 flex w-full flex-col pr-4 pt-2.5 transition-[padding] duration-200",
|
||||
"mb-2 flex w-full flex-col pr-4 pt-2.5 transition-[padding] duration-300 ease-in-out",
|
||||
titleStyleBasedView[view],
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user