diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-09 01:26:04 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-09 01:26:04 +0900 |
| commit | 040d395ddbd9d36eb1ae824728537d2640ecf216 (patch) | |
| tree | 943e3df7de30fb54708994bfdfc86fcf7ecea1ef /src/client/app/common/scripts | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| download | sharkey-040d395ddbd9d36eb1ae824728537d2640ecf216.tar.gz sharkey-040d395ddbd9d36eb1ae824728537d2640ecf216.tar.bz2 sharkey-040d395ddbd9d36eb1ae824728537d2640ecf216.zip | |
:art:
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/note-subscriber.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts index c41897e70f..6c994aa9bc 100644 --- a/src/client/app/common/scripts/note-subscriber.ts +++ b/src/client/app/common/scripts/note-subscriber.ts @@ -86,8 +86,16 @@ export default prop => ({ switch (type) { case 'reacted': { const reaction = body.reaction; - if (this.$_ns_target.reactionCounts == null) Vue.set(this.$_ns_target, 'reactionCounts', {}); + + if (this.$_ns_target.reactionCounts == null) { + Vue.set(this.$_ns_target, 'reactionCounts', {}); + } + this.$_ns_target.reactionCounts[reaction] = (this.$_ns_target.reactionCounts[reaction] || 0) + 1; + + if (body.userId == this.$store.state.i.id) { + Vue.set(this.$_ns_target, 'myReaction', reaction); + } break; } |