refactor: message move and delete

Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
2026-05-07 23:48:02 -04:00
parent f1f4e135bb
commit 603c0caf17
2 changed files with 31 additions and 74 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue'
import { useCollectionsStore } from '@MailManager/stores/collectionsStore'
import { useServicesStore } from '@MailManager/stores/servicesStore'
import { useMailStore } from '@/stores/mailStore'
import type { ServiceObject, CollectionObject } from '@MailManager/models'
import FolderSelectionTreeNode from './FolderSelectionTreeNode.vue'
@@ -31,6 +32,7 @@ const emit = defineEmits<{
}>()
const collectionsStore = useCollectionsStore()
const servicesStore = useServicesStore()
const mailStore = useMailStore()
const selectedFolderKey = ref<string | null>(null)
@@ -52,7 +54,8 @@ interface ServiceGroup {
}
const serviceGroups = computed<ServiceGroup[]>(() => {
const service = props.service ?? mailStore.moveDialogService
const service = props.service ??
(mailStore.moveDialogService ? servicesStore.serviceByIdentifier(mailStore.moveDialogService) : null)
if (!service) {
return []