diff --git a/addons/mail/static/src/components/message_action_list/message_action_list.xml b/addons/mail/static/src/components/message_action_list/message_action_list.xml index 18293288fc4..efe3fcd785f 100644 --- a/addons/mail/static/src/components/message_action_list/message_action_list.xml +++ b/addons/mail/static/src/components/message_action_list/message_action_list.xml @@ -2,7 +2,7 @@ -
+
diff --git a/addons/mail/static/src/models/message_action_view.js b/addons/mail/static/src/models/message_action_view.js index ce79f567c80..f1b4f5c3d60 100644 --- a/addons/mail/static/src/models/message_action_view.js +++ b/addons/mail/static/src/models/message_action_view.js @@ -104,12 +104,30 @@ registerModel({ _computePaddingClassNames() { const isDeviceSmall = this.messaging.device.isSmall; const paddingClassNames = []; - if (this.messageAction.messageActionListOwner.firstActionView === this) { + if ( + ( + this.messageAction.messageActionListOwner.firstActionView === this && + !this.messageAction.messageActionListOwner.messageView.isInChatWindowAndIsAlignedRight + ) || + ( + this.messageAction.messageActionListOwner.lastActionView === this && + this.messageAction.messageActionListOwner.messageView.isInChatWindowAndIsAlignedRight + ) + ) { paddingClassNames.push(isDeviceSmall ? 'ps-3' : 'ps-2'); } else { paddingClassNames.push(isDeviceSmall ? 'ps-2' : 'ps-1'); } - if (this.messageAction.messageActionListOwner.lastActionView === this) { + if ( + ( + this.messageAction.messageActionListOwner.lastActionView === this && + !this.messageAction.messageActionListOwner.messageView.isInChatWindowAndIsAlignedRight + ) || + ( + this.messageAction.messageActionListOwner.firstActionView === this && + this.messageAction.messageActionListOwner.messageView.isInChatWindowAndIsAlignedRight + ) + ) { paddingClassNames.push(isDeviceSmall ? 'pe-3' : 'pe-2'); } else { paddingClassNames.push(isDeviceSmall ? 'pe-2' : 'pe-1');