Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,16 @@
}}
</ActionText>
<NcActionSeparator />
<ActionButton
v-if="withReply"
class="action--primary"
:close-after-click="true"
@click.prevent="onReply()">
<template #icon>
<Reply :size="24" />
</template>
{{ t('mail', 'Reply') }}
</ActionButton>
Comment on lines +251 to +260

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it correct and consistent, please mirror the logic from

<NcActionButton
:close-after-click="true"
@click="onReply('', false)">
<template #icon>
<ReplyAllIcon
v-if="hasMultipleRecipients"
:title="t('mail', 'Reply all')"
:size="20" />
<ReplyIcon
v-else
:title="t('mail', 'Reply')"
:size="20" />
</template>
{{ t('mail', 'Reply') }}
</NcActionButton>
<NcActionButton
v-if="hasMultipleRecipients"
:close-after-click="true"
@click="onReply('', false, true)">
<template #icon>
<ReplyIcon
:title="t('mail', 'Reply to sender only')"
:size="20" />
</template>
{{ t('mail', 'Reply to sender only') }}
</NcActionButton>
.

We should also handle the multiple recipients case properly in this actions menu

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me emulate

<ActionButton :is-menu="true" @click="showQuickActionsMenu">
<template #icon>
<IconEmailFast :size="20" />
Expand Down Expand Up @@ -721,7 +731,7 @@ export default {
accountId: this.data.accountId,
})
}
const recipients = buildReplyRecipients(this.envelope, {
const recipients = buildReplyRecipients(this.data, {
label: this.account.name,
email: this.account.emailAddress,
})
Expand Down Expand Up @@ -1441,6 +1451,17 @@ export default {
}
this.countPossibleAttachements()
},

onReply(body = '', followUp = false, replySenderOnly = false) {
this.mainStore.startComposerSession({
reply: {
mode: (this.hasMultipleRecipients && !replySenderOnly) ? 'replyAll' : 'reply',
data: this.data,
smartReply: body,
followUp,
},
})
},
},
}
</script>
Expand Down
Loading