Browse Source

Fix last_status parameter for notifications and conversations (#9407)

master
ThibG 6 years ago
committed by Eugen Rochko
parent
commit
5648b30d6c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/javascript/mastodon/actions/conversations.js
  2. +1
    -1
      app/javascript/mastodon/actions/notifications.js

+ 1
- 1
app/javascript/mastodon/actions/conversations.js View File

@ -38,7 +38,7 @@ export const expandConversations = ({ maxId } = {}) => (dispatch, getState) => {
const params = { max_id: maxId }; const params = { max_id: maxId };
if (!maxId) { if (!maxId) {
params.since_id = getState().getIn(['conversations', 0, 'last_status']);
params.since_id = getState().getIn(['conversations', 'items', 0, 'last_status']);
} }
api(getState).get('/api/v1/conversations', { params }) api(getState).get('/api/v1/conversations', { params })

+ 1
- 1
app/javascript/mastodon/actions/notifications.js View File

@ -106,7 +106,7 @@ export function expandNotifications({ maxId } = {}, done = noOp) {
}; };
if (!maxId && notifications.get('items').size > 0) { if (!maxId && notifications.get('items').size > 0) {
params.since_id = notifications.getIn(['items', 0]);
params.since_id = notifications.getIn(['items', 0, 'id']);
} }
dispatch(expandNotificationsRequest(isLoadingMore)); dispatch(expandNotificationsRequest(isLoadingMore));

Loading…
Cancel
Save