chore: Clean up

This commit is contained in:
iamsivin
2025-05-13 16:43:45 +05:30
parent 32158da454
commit 12ace33254
7 changed files with 61 additions and 327 deletions
@@ -1,12 +1,5 @@
<script setup>
import {
onMounted,
computed,
ref,
toRefs,
useTemplateRef,
onUnmounted,
} from 'vue';
import { onMounted, computed, ref, toRefs, useTemplateRef } from 'vue';
import { useTimeoutFn } from '@vueuse/core';
import { provideMessageContext } from './provider.js';
import { useTrack } from 'dashboard/composables';
@@ -26,7 +19,6 @@ import {
MESSAGE_STATUS,
CONTENT_TYPES,
} from './constants';
import { useScrollLock } from '@vueuse/core';
import Avatar from 'next/avatar/Avatar.vue';
@@ -138,8 +130,6 @@ const props = defineProps({
sourceId: { type: String, default: '' }, // eslint-disable-line vue/no-unused-properties
});
const conversationPanelElement = document.querySelector('.conversation-panel');
const conversationPanelScrollLock = useScrollLock(conversationPanelElement);
const contextMenuPosition = ref({});
const showBackgroundHighlight = ref(false);
const showContextMenu = ref(false);
@@ -378,9 +368,6 @@ const shouldRenderMessage = computed(() => {
});
function openContextMenu(e) {
// Lock scroll to prevent scrolling when context menu is open
conversationPanelScrollLock.value = true;
// Close forward modal, when opening context menu
emailBubbleRef.value?.closeForwardModal();
@@ -403,8 +390,6 @@ function openContextMenu(e) {
}
function closeContextMenu() {
// Unlock scroll when context menu is closed
conversationPanelScrollLock.value = false;
showContextMenu.value = false;
contextMenuPosition.value = { x: null, y: null };
}
@@ -467,9 +452,6 @@ const openForwardModal = ({ x, y }) => {
};
onMounted(setupHighlightTimer);
onUnmounted(() => {
conversationPanelScrollLock.value = false;
});
provideMessageContext({
...toRefs(props),