fix: MessageArea rendering the last X amount of messages in the messages array rather than the newly-loaded messages

This commit is contained in:
SauceyRed 2025-07-31 03:37:25 +02:00
parent d09890b09a
commit ec66a0a61a
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7

View file

@ -1,7 +1,7 @@
<template>
<div id="message-area">
<div id="messages" ref="messagesElement">
<Message v-for="(message, i) of messages" :username="getDisplayName(message.user)"
<Message v-for="(message, i) of messages" :username="getDisplayName(message.user)" :key="message.uuid"
:text="message.message" :timestamp="messageTimestamps[message.uuid]" :img="message.user.avatar"
:format="timeFormat" :type="messagesType[message.uuid]"
:margin-bottom="(messages[i + 1] && messagesType[messages[i + 1].uuid] == 'normal') ?? false"