mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-22 19:27:55 +11:00
Merge pull request #12 from ElectricS01/experimental
Fix for out of sync read receipts
This commit is contained in:
commit
5c4c695acf
1 changed files with 25 additions and 57 deletions
|
@ -301,31 +301,6 @@
|
||||||
style="display: block; width: 100px; margin: 0 auto"
|
style="display: block; width: 100px; margin: 0 auto"
|
||||||
></v-progress-circular>
|
></v-progress-circular>
|
||||||
<template v-for="(message, index) in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<Message
|
|
||||||
:key="message.keyId"
|
|
||||||
:message="message"
|
|
||||||
:jump-to-message="jumpToMessage"
|
|
||||||
:edit="edit"
|
|
||||||
:focus-input="focusInput"
|
|
||||||
:replying="setReply"
|
|
||||||
:get-name="getName"
|
|
||||||
:end-edit="endEdit"
|
|
||||||
:auto-scroll="autoScroll"
|
|
||||||
:chat="chat"
|
|
||||||
:index="index"
|
|
||||||
:show="show"
|
|
||||||
:set-image-preview="setImagePreview"
|
|
||||||
:delete-message="deleteMessage"
|
|
||||||
:last-message="
|
|
||||||
messages[index - 1]?.userId === message?.userId &&
|
|
||||||
$date(message.createdAt).diff(
|
|
||||||
messages[index - 1]?.createdAt,
|
|
||||||
'minute'
|
|
||||||
) < 10 &&
|
|
||||||
!message.replyId &&
|
|
||||||
!message.type
|
|
||||||
"
|
|
||||||
></Message>
|
|
||||||
<div
|
<div
|
||||||
:key="'div2-' + message.keyId"
|
:key="'div2-' + message.keyId"
|
||||||
v-if="message.readReceipts.length"
|
v-if="message.readReceipts.length"
|
||||||
|
@ -372,39 +347,32 @@
|
||||||
<br v-if="index + 1 > messages.length" />
|
<br v-if="index + 1 > messages.length" />
|
||||||
<br v-if="index + 1 > messages.length" />
|
<br v-if="index + 1 > messages.length" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<Message
|
||||||
<v-tooltip top>
|
:key="message.keyId"
|
||||||
<template v-slot:activator="{ on }">
|
:message="message"
|
||||||
<v-btn
|
:jump-to-message="jumpToMessage"
|
||||||
icon
|
:edit="edit"
|
||||||
small
|
:focus-input="focusInput"
|
||||||
fab
|
:replying="setReply"
|
||||||
width="20"
|
:get-name="getName"
|
||||||
height="20"
|
:end-edit="endEdit"
|
||||||
class="ml-2 mt-2"
|
:auto-scroll="autoScroll"
|
||||||
style="float: right"
|
:chat="chat"
|
||||||
@click="openUserPanel($store.state.user)"
|
:index="index"
|
||||||
>
|
:show="show"
|
||||||
<v-avatar size="20" v-on="on" color="primary">
|
:set-image-preview="setImagePreview"
|
||||||
<img
|
:delete-message="deleteMessage"
|
||||||
v-if="$store.state.user.avatar"
|
:last-message="
|
||||||
:src="
|
messages[index - 1]?.userId === message?.userId &&
|
||||||
$store.state.baseURL +
|
$date(message.createdAt).diff(
|
||||||
'/usercontent/' +
|
messages[index - 1]?.createdAt,
|
||||||
$store.state.user.avatar
|
'minute'
|
||||||
|
) < 10 &&
|
||||||
|
!message.replyId &&
|
||||||
|
!message.type
|
||||||
"
|
"
|
||||||
alt="avatar"
|
></Message>
|
||||||
/>
|
|
||||||
<span v-else>{{
|
|
||||||
$store.state.user.username[0].toUpperCase()
|
|
||||||
}}</span>
|
|
||||||
</v-avatar>
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
</template>
|
||||||
<span>
|
|
||||||
{{ $store.state.user.username }} has read up to this point.
|
|
||||||
</span>
|
|
||||||
</v-tooltip>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
Loading…
Reference in a new issue