summaryrefslogtreecommitdiff
path: root/src/client/app/mobile/views/components/post-form.vue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-16 18:42:49 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-16 18:42:49 +0900
commit555a0f276cfabfc5288bb76bdf1274cf9e7fb8d4 (patch)
tree030dfd1736ef4e13f36e9e773f9e5c23beebd372 /src/client/app/mobile/views/components/post-form.vue
parent3.0.1 (diff)
downloadmisskey-555a0f276cfabfc5288bb76bdf1274cf9e7fb8d4.tar.gz
misskey-555a0f276cfabfc5288bb76bdf1274cf9e7fb8d4.tar.bz2
misskey-555a0f276cfabfc5288bb76bdf1274cf9e7fb8d4.zip
MisskeyShare
Diffstat (limited to 'src/client/app/mobile/views/components/post-form.vue')
-rw-r--r--src/client/app/mobile/views/components/post-form.vue30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 88853fa236..62fa185085 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -54,7 +54,25 @@ export default Vue.extend({
MkVisibilityChooser
},
- props: ['reply', 'renote'],
+ props: {
+ reply: {
+ type: Object,
+ required: false
+ },
+ renote: {
+ type: Object,
+ required: false
+ },
+ initialText: {
+ type: String,
+ required: false
+ },
+ instant: {
+ type: Boolean,
+ required: false,
+ default: false
+ }
+ },
data() {
return {
@@ -112,6 +130,10 @@ export default Vue.extend({
},
mounted() {
+ if (this.initialText) {
+ this.text = this.initialText;
+ }
+
if (this.reply && this.reply.user.host != null) {
this.text = `@${this.reply.user.username}@${this.reply.user.host} `;
}
@@ -252,8 +274,10 @@ export default Vue.extend({
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
viaMobile: viaMobile
}).then(data => {
- this.$emit('note');
- this.$destroy();
+ this.$emit('posted');
+ this.$nextTick(() => {
+ this.$destroy();
+ });
}).catch(err => {
this.posting = false;
});