diff options
-rw-r--r-- | src/components/MessagesList/MessagesList.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesList.vue b/src/components/MessagesList/MessagesList.vue index 6abf5cbc5..fe5598504 100644 --- a/src/components/MessagesList/MessagesList.vue +++ b/src/components/MessagesList/MessagesList.vue @@ -21,7 +21,7 @@ :key="`section_${dateTimestamp}`" :ref="`dateGroup-${token}`" :data-date-timestamp="dateTimestamp" - :class="{'has-sticky': dateTimestamp === stickyDate}"> + :class="{'has-sticky': dateTimestamp === stickyDate && isScrollable}"> <li class="messages-group__date"> <span class="messages-group__date-text" role="heading" aria-level="3"> {{ dateSeparatorLabels[dateTimestamp] }} @@ -267,6 +267,9 @@ export default { this.$store.dispatch('easeMessageList', { token: oldToken }) this.stopFetchingOldMessages = false this.messagesGroupedByDateByAuthor = this.prepareMessagesGroups(this.messagesList) + this.$nextTick(() => { + this.isScrollable = this.$refs.scroller?.scrollHeight > this.$refs.scroller?.clientHeight + }) }, messagesList: { |