remove loading... spinner on database fetch

This commit is contained in:
or-else
2021-08-16 16:04:32 -07:00
parent 0840a79024
commit b783ec2949
7 changed files with 79 additions and 88 deletions
+6 -4
View File
@@ -372,10 +372,12 @@ class MessagesView extends React.Component {
const topic = this.props.tinode.getTopic(this.state.topic); const topic = this.props.tinode.getTopic(this.state.topic);
if (topic && topic.isSubscribed() && topic.msgHasMoreMessages()) { if (topic && topic.isSubscribed() && topic.msgHasMoreMessages()) {
newState.fetchingMessages = true; newState.fetchingMessages = true;
topic.getMessagesPage(MESSAGES_PAGE).catch((err) => { topic.getMessagesPage(MESSAGES_PAGE)
this.setState({fetchingMessages: false}); .then(() => this.setState({fetchingMessages: false}))
this.props.onError(err.message, 'err'); .catch((err) => {
}); this.setState({fetchingMessages: false});
this.props.onError(err.message, 'err');
});
} }
} }
return newState; return newState;
+3 -1
View File
@@ -3441,7 +3441,9 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
if (topic && topic.isSubscribed() && topic.msgHasMoreMessages()) { if (topic && topic.isSubscribed() && topic.msgHasMoreMessages()) {
newState.fetchingMessages = true; newState.fetchingMessages = true;
topic.getMessagesPage(_config_js__WEBPACK_IMPORTED_MODULE_13__.MESSAGES_PAGE).catch(err => { topic.getMessagesPage(_config_js__WEBPACK_IMPORTED_MODULE_13__.MESSAGES_PAGE).then(() => this.setState({
fetchingMessages: false
})).catch(err => {
this.setState({ this.setState({
fetchingMessages: false fetchingMessages: false
}); });
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+66 -79
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long