diff options
| author | Henry Jameson <me@hjkos.com> | 2022-04-05 17:11:50 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-04-05 17:11:50 +0300 |
| commit | 0a606c2720734f941a22b14b3460aaa4a500db4b (patch) | |
| tree | 6dbb0eb5ee0927bb4179df7b2038bd0893b0277f /src/components/chat/chat.js | |
| parent | cfa8edf2c075d16e3b04f4a6463657eb777c623c (diff) | |
fix chat loading endlessly
Diffstat (limited to 'src/components/chat/chat.js')
| -rw-r--r-- | src/components/chat/chat.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js index 91e5c98e..5d2c1d09 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat/chat.js @@ -6,7 +6,7 @@ import PostStatusForm from '../post_status_form/post_status_form.vue' import ChatTitle from '../chat_title/chat_title.vue' import chatService from '../../services/chat_service/chat_service.js' import { promiseInterval } from '../../services/promise_interval/promise_interval.js' -import { getScrollPosition, getNewTopPosition, isBottomedOut } from './chat_layout_utils.js' +import { getScrollPosition, getNewTopPosition, isBottomedOut, isScrollable } from './chat_layout_utils.js' import { library } from '@fortawesome/fontawesome-svg-core' import { faChevronDown, @@ -281,7 +281,7 @@ const Chat = { // full height of the scrollable container. // If this is the case, we want to fetch the messages until the scrollable container // is fully populated so that the user has the ability to scroll up and load the history. - if (messages.length > 0) { + if (!isScrollable(scroller()) && messages.length > 0) { this.fetchChat({ maxId: this.currentChatMessageService.minId }) } }) |
