mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
revert: Next bubble improvements (#10795)
This commit is contained in:
@@ -74,11 +74,7 @@ const shouldGroupWithNext = (index, searchList) => {
|
||||
nextMessageType === MESSAGE_TYPES.TEMPLATE &&
|
||||
currentMessageType === MESSAGE_TYPES.TEMPLATE;
|
||||
|
||||
const areBothActivity =
|
||||
nextMessageType === MESSAGE_TYPES.ACTIVITY &&
|
||||
currentMessageType === MESSAGE_TYPES.ACTIVITY;
|
||||
|
||||
if (!hasSameSender || areBothTemplates || areBothActivity) return false;
|
||||
if (!hasSameSender || areBothTemplates) return false;
|
||||
|
||||
if (currentMessageType !== nextMessageType) return false;
|
||||
|
||||
@@ -107,17 +103,6 @@ const getInReplyToMessage = parentMessage => {
|
||||
|
||||
return replyMessage ? useCamelCase(replyMessage) : null;
|
||||
};
|
||||
|
||||
const getMessageSpacingClass = (message, messages, index) => {
|
||||
// For non-activity messages, use groupWithNext logic
|
||||
if (message.messageType !== MESSAGE_TYPES.ACTIVITY) {
|
||||
return shouldGroupWithNext(index, messages) ? 'mb-1' : 'mb-6';
|
||||
}
|
||||
|
||||
// For activity messages, check next message exists and is also an activity
|
||||
const nextMessage = messages[index + 1];
|
||||
return nextMessage?.messageType === MESSAGE_TYPES.ACTIVITY ? 'mb-2' : 'mb-6';
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -131,7 +116,6 @@ const getMessageSpacingClass = (message, messages, index) => {
|
||||
:group-with-next="shouldGroupWithNext(index, read)"
|
||||
:inbox-supports-reply-to="inboxSupportsReplyTo"
|
||||
:current-user-id="currentUserId"
|
||||
:class="getMessageSpacingClass(message, read, index)"
|
||||
data-clarity-mask="True"
|
||||
/>
|
||||
</template>
|
||||
@@ -144,7 +128,6 @@ const getMessageSpacingClass = (message, messages, index) => {
|
||||
:inbox-supports-reply-to="inboxSupportsReplyTo"
|
||||
:current-user-id="currentUserId"
|
||||
:is-email-inbox="isAnEmailChannel"
|
||||
:class="getMessageSpacingClass(message, unread, index)"
|
||||
data-clarity-mask="True"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user