Skip to content
Snippets Groups Projects
Commit 0c7c24d3 authored by Shpuld Shpludson's avatar Shpuld Shpludson
Browse files

make idempotency watch entire status

parent 89a677f5
No related branches found
No related tags found
2 merge requests!12172.1.0 into master,!1194Status posting Idempotency
Pipeline #28688 passed
......@@ -208,14 +208,18 @@ const PostStatusForm = {
})
},
watch: {
'newStatus.contentType': function () {
this.autoPreview()
},
'newStatus.spoilerText': function () {
this.autoPreview()
'newStatus': {
deep: true,
handler () {
this.statusChanged()
}
}
},
methods: {
statusChanged () {
this.autoPreview()
this.updateIdempotencyKey()
},
clearStatus () {
const newStatus = this.newStatus
this.newStatus = {
......@@ -239,7 +243,6 @@ const PostStatusForm = {
el.style.height = 'auto'
el.style.height = undefined
this.error = null
this.updateIdempotencyKey()
if (this.preview) this.previewStatus()
},
async postStatus (event, newStatus, opts = {}) {
......@@ -407,7 +410,6 @@ const PostStatusForm = {
}
},
onEmojiInputInput (e) {
this.autoPreview()
this.$nextTick(() => {
this.resize(this.$refs['textarea'])
})
......
......@@ -30,10 +30,6 @@ const postStatus = ({
idempotencyKey
})
.then((data) => {
return {
error: 'test'
}
/*
if (!data.error && !preview) {
store.dispatch('addNewStatuses', {
statuses: [data],
......@@ -43,7 +39,6 @@ const postStatus = ({
})
}
return data
*/
})
.catch((err) => {
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment