mostly functional

This commit is contained in:
or-else
2023-04-27 17:44:20 -07:00
parent 1bc3e15da3
commit c277c16a53
9 changed files with 33 additions and 43 deletions
+1 -2
View File
@@ -585,9 +585,8 @@ class MessagesView extends React.Component {
const {min, max} = this.getVisibleMessageRange(event.target.getBoundingClientRect());
const gaps = topic.msgHasMoreMessages(min, max, false);
if (gaps.length > 0) {
console.log("Fetch triggered", min, max, gaps);
this.setState({fetchingMessages: true}, _ => {
topic.getMessagesPage(MESSAGES_PAGE, gaps)
topic.getMessagesPage(MESSAGES_PAGE, gaps, min, max)
.catch(err => this.props.onError(err.message, 'err'))
.finally(_ => this.setState({fetchingMessages: false}));
});