Use Conversation IDs instead of status IDs, fixes #77
This commit is contained in:
parent
70a3e53db4
commit
f04e1fddae
2 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue