Skip to content

Commit

Permalink
Fix issue with the no-results slot being (incorrectly) used
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Oct 6, 2024
1 parent 80b1385 commit 693173f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/views/containers/chatroom/ChatMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions test/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 693173f

Please sign in to comment.