summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-09 01:26:04 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-09 01:26:04 +0900
commit040d395ddbd9d36eb1ae824728537d2640ecf216 (patch)
tree943e3df7de30fb54708994bfdfc86fcf7ecea1ef /src/client/app/common/scripts
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadsharkey-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.ts10
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;
}