[FIX] mail: avoid empty seen indicator
`MessageSeenIndicator` sub-component should not be rendered if the thread does not support seen indicators. The issue is manifesting because the otherwise empty indicator has a margin, which is adding more space than expected before the following element. closes odoo/odoo#62172 X-original-commit: 4e0e8a415ae2175cd68e514cff33b2bffeb99db7 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
<div class="o_Message_date o_Message_headerDate" t-att-class="{ 'o-message-selected': props.isSelected }" t-att-title="datetime">
|
||||
- <t t-esc="message.dateFromNow"/>
|
||||
</div>
|
||||
<t t-if="message.isCurrentPartnerAuthor and threadView and threadView.thread">
|
||||
<t t-if="message.isCurrentPartnerAuthor and threadView and threadView.thread and threadView.thread.hasSeenIndicators">
|
||||
<MessageSeenIndicator class="o_Message_seenIndicator" messageLocalId="message.localId" threadLocalId="threadView.thread.localId"/>
|
||||
</t>
|
||||
<t t-if="threadView and message.originThread and message.originThread !== threadView.thread">
|
||||
|
||||
@@ -343,6 +343,7 @@ QUnit.test("'channel_fetch' notification received is correctly handled", async f
|
||||
display_name: "Demo User",
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
members: [
|
||||
[['link', currentPartner]],
|
||||
@@ -404,6 +405,7 @@ QUnit.test("'channel_seen' notification received is correctly handled", async fu
|
||||
display_name: "Demo User",
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
members: [
|
||||
[['link', currentPartner]],
|
||||
@@ -464,6 +466,7 @@ QUnit.test("'channel_fetch' notification then 'channel_seen' received are corre
|
||||
display_name: "Demo User",
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
members: [
|
||||
[['link', currentPartner]],
|
||||
@@ -541,6 +544,7 @@ QUnit.test('do not show messaging seen indicator if not authored by me', async f
|
||||
display_name: "Demo User"
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
partnerSeenInfos: [['create', [
|
||||
{
|
||||
@@ -589,6 +593,7 @@ QUnit.test('do not show messaging seen indicator if before last seen by all mess
|
||||
display_name: "Demo User",
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
messageSeenIndicators: [['insert', {
|
||||
channelId: 11,
|
||||
@@ -654,6 +659,7 @@ QUnit.test('only show messaging seen indicator if authored by me, after last see
|
||||
display_name: "Demo User"
|
||||
});
|
||||
const thread = this.env.models['mail.thread'].create({
|
||||
channel_type: 'chat',
|
||||
id: 11,
|
||||
partnerSeenInfos: [['create', [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user