mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
remove setTimeout
This commit is contained in:
parent
c21026e28a
commit
ac6bbf1840
@ -146,7 +146,7 @@ export default {
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
fetchMessages({ room, options = {} }) {
|
||||
async fetchMessages({ room, options = {} }) {
|
||||
if (this.lastRoom !== room.id) {
|
||||
this.messages = []
|
||||
this.messagePage = 0
|
||||
@ -154,7 +154,6 @@ export default {
|
||||
}
|
||||
this.messagesLoaded = options.refetch ? this.messagesLoaded : false
|
||||
const offset = (options.refetch ? 0 : this.messagePage) * this.messagePageSize
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
const {
|
||||
data: { Message },
|
||||
@ -182,7 +181,6 @@ export default {
|
||||
this.messages = []
|
||||
this.$toast.error(error.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
refetchMessage(roomId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user