From 16ae8af889662a49701d5d2e6e4223422dca87cc Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 18 Dec 2022 11:52:53 +0800 Subject: [PATCH] Replace deprecated methods --- src/pages/home.jsx | 6 +++--- src/pages/notifications.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/home.jsx b/src/pages/home.jsx index 06278693..1bcca842 100644 --- a/src/pages/home.jsx +++ b/src/pages/home.jsx @@ -16,13 +16,13 @@ function Home({ hidden }) { const [uiState, setUIState] = useState('default'); const [showMore, setShowMore] = useState(false); - const statusIterator = useRef( - masto.timelines.getHomeIterable({ + const homeIterator = useRef( + masto.timelines.iterateHome({ limit: LIMIT, }), ).current; async function fetchStatuses(firstLoad) { - const allStatuses = await statusIterator.next( + const allStatuses = await homeIterator.next( firstLoad ? { limit: LIMIT, diff --git a/src/pages/notifications.jsx b/src/pages/notifications.jsx index 6796aabd..2820e8f4 100644 --- a/src/pages/notifications.jsx +++ b/src/pages/notifications.jsx @@ -207,7 +207,7 @@ function Notifications() { const [onlyMentions, setOnlyMentions] = useState(false); const notificationsIterator = useRef( - masto.notifications.getIterator({ + masto.notifications.iterate({ limit: LIMIT, }), ).current;