Use Conversation IDs instead of status IDs, fixes #77

This commit is contained in:
Alex Gleason 2020-05-26 23:22:07 -05:00
parent 70a3e53db4
commit f04e1fddae
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 3 additions and 6 deletions

View file

@ -42,7 +42,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', 'items', 0, 'last_status']); params.since_id = getState().getIn(['conversations', 'items', 0, 'id']);
} }
const isLoadingRecent = !!params.since_id; const isLoadingRecent = !!params.since_id;

View file

@ -46,11 +46,8 @@ export default class ConversationsList extends ImmutablePureComponent {
} }
handleLoadOlder = debounce(() => { handleLoadOlder = debounce(() => {
const last = this.props.conversations.last(); const maxId = this.props.conversations.getIn([-1, 'id']);
if (maxId) this.props.onLoadMore(maxId);
if (last && last.get('last_status')) {
this.props.onLoadMore(last.get('last_status'));
}
}, 300, { leading: true }) }, 300, { leading: true })
render() { render() {