From b6a330928db0cf62ac0cfe484cd5e148edb9ce12 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 7 Oct 2018 20:08:42 +0900 Subject: 投稿の削除イベントを受け取るように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/scripts/note-subscriber.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts index 5fc82942d5..c41897e70f 100644 --- a/src/client/app/common/scripts/note-subscriber.ts +++ b/src/client/app/common/scripts/note-subscriber.ts @@ -97,6 +97,17 @@ export default prop => ({ this.$_ns_target.poll.choices.find(c => c.id === choice).votes++; break; } + + case 'deleted': { + Vue.set(this.$_ns_target, 'deletedAt', body.deletedAt); + this.$_ns_target.text = null; + this.$_ns_target.tags = []; + this.$_ns_target.fileIds = []; + this.$_ns_target.poll = null; + this.$_ns_target.geo = null; + this.$_ns_target.cw = null; + break; + } } this.$emit(`update:${prop}`, this.$_ns_note_); -- cgit v1.2.3-freya