From 6f8f3678edfdac8323bbd13dcc70a288693c99a6 Mon Sep 17 00:00:00 2001 From: KMY Date: Mon, 16 Oct 2023 12:37:49 +0900 Subject: [PATCH] =?UTF-8?q?Change:=20=E3=83=96=E3=83=83=E3=82=AF=E3=83=9E?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E5=88=86=E9=A1=9E=E3=81=AE=E6=8A=95=E7=A8=BF?= =?UTF-8?q?=E4=B8=80=E8=A6=A7=E3=81=AE=E3=83=9A=E3=83=BC=E3=82=B8=E3=83=8D?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/actions/bookmark_categories.js | 7 ++++--- .../mastodon/features/bookmark_category_statuses/index.jsx | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/actions/bookmark_categories.js b/app/javascript/mastodon/actions/bookmark_categories.js index b6f82b49c8a9f7..7d458b85ece1d6 100644 --- a/app/javascript/mastodon/actions/bookmark_categories.js +++ b/app/javascript/mastodon/actions/bookmark_categories.js @@ -213,9 +213,10 @@ export const deleteBookmarkCategoryFail = (id, error) => ({ export const fetchBookmarkCategoryStatuses = bookmarkCategoryId => (dispatch, getState) => { dispatch(fetchBookmarkCategoryStatusesRequest(bookmarkCategoryId)); - api(getState).get(`/api/v1/bookmark_categories/${bookmarkCategoryId}/statuses`, { params: { limit: 0 } }).then(({ data }) => { - dispatch(importFetchedStatuses(data)); - dispatch(fetchBookmarkCategoryStatusesSuccess(bookmarkCategoryId, data)); + api(getState).get(`/api/v1/bookmark_categories/${bookmarkCategoryId}/statuses`).then((response) => { + const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedStatuses(response.data)); + dispatch(fetchBookmarkCategoryStatusesSuccess(bookmarkCategoryId, response.data, next ? next.uri : null)); }).catch(err => dispatch(fetchBookmarkCategoryStatusesFail(bookmarkCategoryId, err))); }; diff --git a/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx b/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx index ed5fa17be7da94..3db87fe34bea33 100644 --- a/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx +++ b/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx @@ -113,7 +113,8 @@ class BookmarkCategoryStatuses extends ImmutablePureComponent { }; handleLoadMore = debounce(() => { - this.props.dispatch(expandBookmarkCategoryStatuses()); + console.dir(this.props.params.id); + this.props.dispatch(expandBookmarkCategoryStatuses(this.props.params.id)); }, 300, { leading: true }); render () {