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