diff --git a/frontend/views/containers/chatroom/ChatMain.vue b/frontend/views/containers/chatroom/ChatMain.vue index 79e219900..b411aadb0 100644 --- a/frontend/views/containers/chatroom/ChatMain.vue +++ b/frontend/views/containers/chatroom/ChatMain.vue @@ -1055,6 +1055,11 @@ export default ({ if (!this.checkEventSourceConsistency(chatRoomID)) return if (completed === true) { + // If there's messages, call $state.loaded. This has the effect that + // the no-more message will be shown instead of the no-results message + if (this.messages.length) { + $state.loaded() + } $state.complete() if (!this.$refs.conversation || this.$refs.conversation.scrollHeight === this.$refs.conversation.clientHeight) { diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 860c1be5b..f385bb4a5 100644 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -689,6 +689,7 @@ Cypress.Commands.add('giAddNewChatroom', ({ cy.giWaitUntilMessagesLoaded() cy.getByDT('conversationWrapper').within(() => { + // This checks for the 'no-more' slot of the infinite loader cy.get('.infinite-status-prompt:nth-child(3)') .invoke('attr', 'style') .should('not.include', 'display: none')