diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index 484e4e53d..c6b989215 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -5046,16 +5046,16 @@ export function reducer( return state; } - const toIncrement = - data.reactions?.length || - existingMessage.editHistory?.length !== data.editHistory?.length - ? 1 - : 0; + const hasNewEdit = + existingMessage.editHistory?.length !== data.editHistory?.length ? 1 : 0; + const toIncrement = data.reactions?.length || hasNewEdit; const updatedMessage = { ...data, displayLimit: existingMessage.displayLimit, - isSpoilerExpanded: existingMessage.isSpoilerExpanded, + isSpoilerExpanded: hasNewEdit + ? undefined + : existingMessage.isSpoilerExpanded, }; return {