mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-25 12:46:42 +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"
|
||||
></v-progress-circular>
|
||||
<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
|
||||
:key="'div2-' + message.keyId"
|
||||
v-if="message.readReceipts.length"
|
||||
|
@ -372,39 +347,32 @@
|
|||
<br v-if="index + 1 > messages.length" />
|
||||
<br v-if="index + 1 > messages.length" />
|
||||
</div>
|
||||
<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>
|
||||
</template>
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
icon
|
||||
small
|
||||
fab
|
||||
width="20"
|
||||
height="20"
|
||||
class="ml-2 mt-2"
|
||||
style="float: right"
|
||||
@click="openUserPanel($store.state.user)"
|
||||
>
|
||||
<v-avatar size="20" v-on="on" color="primary">
|
||||
<img
|
||||
v-if="$store.state.user.avatar"
|
||||
:src="
|
||||
$store.state.baseURL +
|
||||
'/usercontent/' +
|
||||
$store.state.user.avatar
|
||||
"
|
||||
alt="avatar"
|
||||
/>
|
||||
<span v-else>{{
|
||||
$store.state.user.username[0].toUpperCase()
|
||||
}}</span>
|
||||
</v-avatar>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>
|
||||
{{ $store.state.user.username }} has read up to this point.
|
||||
</span>
|
||||
</v-tooltip>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
|
Loading…
Reference in a new issue