From 0411bc8f470644fd614ea45a696fe62c6fbedb22 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 8 Sep 2026 17:56:18 +0300 Subject: [PATCH] sorting --- src/components/conversation/conversation.js | 24 +++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index bbb55cd04..63c843057 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -261,21 +261,10 @@ export default { // # Virtual scrolling stuff const body = useTemplateRef('body') - const { virtualHidden } = toRefs(props) const virtualHeight = ref(120) const hiddenStyle = computed(() => ({ height: this.virtualHeight + 'px', })) - const unsuspendibleIds = ref(new Set()) - const suspendable = computed(() => unsuspendibleIds.value.size === 0) - const hide = computed(() => virtualHidden.value && suspendable.value) - const onStatusSuspendStateChange = ({ id, suspend }) => { - if (!suspend) { - unsuspendibleIds.value.add(id) - } else { - unsuspendibleIds.value.delete(id) - } - } const updateVirtualHeight = () => { if (hide) return // no updates when not rendering if (!status.value) return // not loaded yet @@ -288,6 +277,19 @@ export default { }) }) } + + const unsuspendibleIds = ref(new Set()) + const suspendable = computed(() => unsuspendibleIds.value.size === 0) + const onStatusSuspendStateChange = ({ id, suspend }) => { + if (!suspend) { + unsuspendibleIds.value.add(id) + } else { + unsuspendibleIds.value.delete(id) + } + } + + const { virtualHidden } = toRefs(props) + const hide = computed(() => virtualHidden.value && suspendable.value) onMounted(() => { updateVirtualHeight() })