From f04e1fddae9331f4c6f268a233fcdb2d09381561 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 26 May 2020 23:22:07 -0500 Subject: [PATCH] Use Conversation IDs instead of status IDs, fixes #77 --- app/gabsocial/actions/conversations.js | 2 +- .../direct_timeline/components/conversations_list.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/gabsocial/actions/conversations.js b/app/gabsocial/actions/conversations.js index 22b5ad526..fc1305156 100644 --- a/app/gabsocial/actions/conversations.js +++ b/app/gabsocial/actions/conversations.js @@ -42,7 +42,7 @@ export const expandConversations = ({ maxId } = {}) => (dispatch, getState) => { const params = { max_id: maxId }; if (!maxId) { - params.since_id = getState().getIn(['conversations', 'items', 0, 'last_status']); + params.since_id = getState().getIn(['conversations', 'items', 0, 'id']); } const isLoadingRecent = !!params.since_id; diff --git a/app/gabsocial/features/direct_timeline/components/conversations_list.js b/app/gabsocial/features/direct_timeline/components/conversations_list.js index ed22f73c1..587441685 100644 --- a/app/gabsocial/features/direct_timeline/components/conversations_list.js +++ b/app/gabsocial/features/direct_timeline/components/conversations_list.js @@ -46,11 +46,8 @@ export default class ConversationsList extends ImmutablePureComponent { } handleLoadOlder = debounce(() => { - const last = this.props.conversations.last(); - - if (last && last.get('last_status')) { - this.props.onLoadMore(last.get('last_status')); - } + const maxId = this.props.conversations.getIn([-1, 'id']); + if (maxId) this.props.onLoadMore(maxId); }, 300, { leading: true }) render() {