mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 19:00:12 +01:00
Move every CardComments.findOne() to the ReactiveCache
This commit is contained in:
parent
0e714a90e0
commit
0a7ffe4cb0
4 changed files with 27 additions and 4 deletions
|
|
@ -286,7 +286,7 @@ Template.commentReactions.events({
|
|||
if (ReactiveCache.getCurrentUser().isBoardMember()) {
|
||||
const codepoint = event.currentTarget.dataset['codepoint'];
|
||||
const commentId = Template.instance().data.commentId;
|
||||
const cardComment = CardComments.findOne({_id: commentId});
|
||||
const cardComment = ReactiveCache.getCardComment(commentId);
|
||||
cardComment.toggleReaction(codepoint);
|
||||
}
|
||||
},
|
||||
|
|
@ -298,7 +298,7 @@ Template.addReactionPopup.events({
|
|||
if (ReactiveCache.getCurrentUser().isBoardMember()) {
|
||||
const codepoint = event.currentTarget.dataset['codepoint'];
|
||||
const commentId = Template.instance().data.commentId;
|
||||
const cardComment = CardComments.findOne({_id: commentId});
|
||||
const cardComment = ReactiveCache.getCardComment(commentId);
|
||||
cardComment.toggleReaction(codepoint);
|
||||
}
|
||||
Popup.back();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue