зеркало из https://github.com/nextcloud/spreed.git
Merge pull request #2813 from nextcloud/bugfix/2810/remove-reply-before-waiting-for-the-response
Remove the reply before waiting for the servers response
This commit is contained in:
Коммит
cba9d4e9d9
|
@ -218,13 +218,13 @@ export default {
|
|||
this.$nextTick(function() {
|
||||
document.querySelector('.scroller').scrollTop = document.querySelector('.scroller').scrollHeight
|
||||
})
|
||||
// Also remove the message to be replied for this conversation
|
||||
this.$store.dispatch('removeMessageToBeReplied', this.token)
|
||||
try {
|
||||
// Posts the message to the server
|
||||
const response = await postNewMessage(temporaryMessage)
|
||||
// If successful, deletes the temporary message from the store
|
||||
this.$store.dispatch('deleteMessage', temporaryMessage)
|
||||
// Also remove the message to be replied for this conversation
|
||||
this.$store.dispatch('removeMessageToBeReplied', this.token)
|
||||
// And adds the complete version of the message received
|
||||
// by the server
|
||||
this.$store.dispatch('processMessage', response.data.ocs.data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче