refactor: message move and delete
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
@@ -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 []
|
||||
|
||||
Reference in New Issue
Block a user