зеркало из https://github.com/nextcloud/spreed.git
Remove the reply before waiting for the servers response
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
cc55a3e8dc
Коммит
cd46dcf855
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче