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..5f5624fb46b08f 100644 --- a/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx +++ b/app/javascript/mastodon/features/bookmark_category_statuses/index.jsx @@ -113,7 +113,7 @@ class BookmarkCategoryStatuses extends ImmutablePureComponent { }; handleLoadMore = debounce(() => { - this.props.dispatch(expandBookmarkCategoryStatuses()); + this.props.dispatch(expandBookmarkCategoryStatuses(this.props.params.id)); }, 300, { leading: true }); render () {