This commit is contained in:
Troplo 2022-08-15 22:49:17 +10:00
parent 11b8edf717
commit 642b4ccf34
3 changed files with 6 additions and 4 deletions

View file

@ -1,12 +1,12 @@
{ {
"name": "colubrina", "name": "colubrina",
"version": "1.0.23", "version": "1.0.24",
"description": "Simple instant communication.", "description": "Simple instant communication.",
"private": true, "private": true,
"author": "Troplo <troplo@troplo.com>", "author": "Troplo <troplo@troplo.com>",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build --no-clean",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build", "electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve", "electron:serve": "vue-cli-service electron:serve",

View file

@ -974,12 +974,13 @@ export default {
return this.message.poll.options.map((option) => { return this.message.poll.options.map((option) => {
return { return {
id: option.id, id: option.id,
percentage: percentage: Math.round(
((this.message.poll.answers?.filter( ((this.message.poll.answers?.filter(
(answer) => answer?.answer === option.id (answer) => answer?.answer === option.id
).length || 0) / ).length || 0) /
this.message.poll.answers.length) * this.message.poll.answers.length) *
100 || 0 100 || 0
)
} }
}) })
}, },

View file

@ -1064,6 +1064,7 @@ export default {
}) })
}, },
async getMessages() { async getMessages() {
this.loadingMessages = true
this.autoScroll() this.autoScroll()
await this.axios await this.axios
.get( .get(
@ -1232,13 +1233,13 @@ export default {
drafts[oldVal] = "" drafts[oldVal] = ""
} }
this.message = drafts[val] || "" this.message = drafts[val] || ""
this.messages = []
this.usersTyping = [] this.usersTyping = []
this.replying = null this.replying = null
this.reachedTop = false this.reachedTop = false
this.avoidAutoScroll = false this.avoidAutoScroll = false
this.offset = 0 this.offset = 0
this.pins = [] this.pins = []
this.messages = []
this.getMessages() this.getMessages()
} }
}, },