From 7e302770d11bfa32bf9210a604d3d327b8ae6f4d Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 22 Apr 2023 20:17:15 +0800 Subject: [PATCH] Fix List not respecting boosts carousel settings --- src/pages/list.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/list.jsx b/src/pages/list.jsx index d73a0d59..719f9a75 100644 --- a/src/pages/list.jsx +++ b/src/pages/list.jsx @@ -4,6 +4,7 @@ import { Menu, MenuItem } from '@szhsin/react-menu'; import { useEffect, useRef, useState } from 'preact/hooks'; import { InView } from 'react-intersection-observer'; import { useNavigate, useParams } from 'react-router-dom'; +import { useSnapshot } from 'valtio'; import AccountBlock from '../components/account-block'; import Icon from '../components/icon'; @@ -13,12 +14,13 @@ import Modal from '../components/modal'; import Timeline from '../components/timeline'; import { api } from '../utils/api'; import { filteredItems } from '../utils/filters'; -import { saveStatus } from '../utils/states'; +import states, { saveStatus } from '../utils/states'; import useTitle from '../utils/useTitle'; const LIMIT = 20; function List(props) { + const snapStates = useSnapshot(states); const { masto, instance } = api(); const id = props?.id || useParams()?.id; const navigate = useNavigate(); @@ -93,7 +95,7 @@ function List(props) { fetchItems={fetchList} checkForUpdates={checkForUpdates} useItemID - boostsCarousel + boostsCarousel={snapStates.settings.boostsCarousel} allowFilters // refresh={reloadCount} headerStart={