diff --git a/src/components/Composer.vue b/src/components/Composer.vue index c87ceaf4..e93529ae 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -34,7 +34,7 @@
+ title="" data-original-title="Post" :disabled="post.length < 1"> @@ -90,6 +90,7 @@ .message { width: 100%; + padding-right: 44px; } .author .social-id { @@ -286,8 +287,10 @@ export default { this.$store.dispatch('post', { content: this.post, type: this.type, - }).then((response) => { response.length > 0 ? $state.loaded() : $state.complete() }); - event.preventDefault() + }).then((response) => { + this.post = '' + this.$refs.composerInput.innerText = this.post + }); } }, data() { diff --git a/src/store/timeline.js b/src/store/timeline.js index 2978bd59..a2e110ac 100644 --- a/src/store/timeline.js +++ b/src/store/timeline.js @@ -41,7 +41,7 @@ const getters = { } const actions = { post(context, post) { - axios.post(OC.generateUrl('apps/social/api/v1/post'), {data: post}).then((response) => { + return axios.post(OC.generateUrl('apps/social/api/v1/post'), {data: post}).then((response) => { let uid = '' context.commit('addPost', { uid: uid, data: response.data }) })