@@ -210,6 +210,15 @@ const handleFlag = (flag: string, value: boolean) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleRecipientClick = (message: EntityObject) => {
|
||||||
|
if (props.selectionMode) {
|
||||||
|
emit('selectionToggleOne', message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
emit('open', message)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
clearLongPressTimer()
|
clearLongPressTimer()
|
||||||
@@ -364,7 +373,10 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
<v-list-item-title class="d-flex align-center">
|
<v-list-item-title class="d-flex align-center">
|
||||||
<span class="flex-grow-1 text-truncate">
|
<span class="flex-grow-1 text-truncate">
|
||||||
<RecipientDetails :address="message.properties.from">
|
<RecipientDetails
|
||||||
|
:address="message.properties.from"
|
||||||
|
@clicked="handleRecipientClick(message)"
|
||||||
|
>
|
||||||
<template #default="{ label }">
|
<template #default="{ label }">
|
||||||
<span class="message-person-link text-truncate">{{ label }}</span>
|
<span class="message-person-link text-truncate">{{ label }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ interface Props {
|
|||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
|
// Emits
|
||||||
|
const emit = defineEmits<{
|
||||||
|
clicked: []
|
||||||
|
}>()
|
||||||
|
|
||||||
const mailUiStore = useMailUiStore()
|
const mailUiStore = useMailUiStore()
|
||||||
const { showSnackbar } = useSnackbar()
|
const { showSnackbar } = useSnackbar()
|
||||||
|
|
||||||
@@ -51,6 +56,10 @@ const handleCompose = () => {
|
|||||||
|
|
||||||
mailUiStore.openComposer(props.address, ComposerMode.Fresh)
|
mailUiStore.openComposer(props.address, ComposerMode.Fresh)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
emit('clicked')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -65,7 +74,7 @@ const handleCompose = () => {
|
|||||||
<span
|
<span
|
||||||
v-bind="activatorProps"
|
v-bind="activatorProps"
|
||||||
class="address-activator"
|
class="address-activator"
|
||||||
@click.stop
|
@click="handleClick"
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
:label="displayLabel"
|
:label="displayLabel"
|
||||||
|
|||||||
@@ -528,8 +528,6 @@ export const useMailStore = defineStore('mailStore', () => {
|
|||||||
|
|
||||||
const shouldNotify = options.notify ?? true
|
const shouldNotify = options.notify ?? true
|
||||||
|
|
||||||
loading.value = true
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const patch = entitiesStore.fresh().properties
|
const patch = entitiesStore.fresh().properties
|
||||||
patch.flags = flags
|
patch.flags = flags
|
||||||
@@ -556,8 +554,6 @@ export const useMailStore = defineStore('mailStore', () => {
|
|||||||
console.error('[Mail][Operations] Failed to update messages:', error)
|
console.error('[Mail][Operations] Failed to update messages:', error)
|
||||||
notify(messageText, 'error')
|
notify(messageText, 'error')
|
||||||
throw error
|
throw error
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user