This commit is contained in:
Troplo 2022-10-04 20:52:12 +11:00
parent e2afefedb2
commit 5edbd5ad4d
4 changed files with 18 additions and 20 deletions

View file

@ -1,6 +1,6 @@
{
"name": "colubrina",
"version": "1.0.31",
"version": "1.0.32",
"description": "Simple instant communication.",
"private": true,
"author": "Troplo <troplo@troplo.com>",

View file

@ -1,7 +1,8 @@
<template>
<div>
<span>
<v-card
:min-width="!$vuetify.breakpoint.mobile ? 400 : 0"
:max-width="500"
elevation="0"
color="card"
v-if="embed.type === 'image'"
@ -164,7 +165,7 @@
</v-row>
</v-container>
</v-card>
</div>
</span>
</template>
<script>

View file

@ -153,14 +153,13 @@
</span>
<template v-if="edit.id !== message.id">
<v-row
<Embed
v-for="(embed, index) in message.embeds"
:key="index"
:id="'embed-' + index"
no-gutters
>
<Embed :embed="embed" :setImagePreview="setImagePreview"></Embed>
</v-row>
:embed="embed"
:setImagePreview="setImagePreview"
></Embed>
<v-row v-if="message.poll" no-gutters>
<Poll :message="message"></Poll>
</v-row>

View file

@ -833,18 +833,16 @@ export default {
this.replying = message
},
markAsRead() {
if (this.items) {
try {
const unread = this.$store.state.chats.find(
(item) => item.id === JSON.parse(this.$route.params.id)
).unread
this.items.find(
(item) => item.id === JSON.parse(this.$route.params.id)
).unread = 0
this.$store.state.communicationNotifications -= unread
} catch {
return
}
try {
const unread = this.$store.state.chats.find(
(item) => item.id === JSON.parse(this.$route.params.id)
).unread
this.$store.state.chats.find(
(item) => item.id === JSON.parse(this.$route.params.id)
).unread = 0
this.$store.state.communicationNotifications -= unread
} catch {
console.log("Chat could not be found (markAsRead)")
}
},
endSend() {