mirror of
https://github.com/wekan/wekan.git
synced 2026-01-30 21:25:17 +01:00
Move every Activities.findOne() to the ReactiveCache
This commit is contained in:
parent
54f7361767
commit
79ea4d6d1e
3 changed files with 27 additions and 4 deletions
|
|
@ -16,15 +16,15 @@ Template.notification.events({
|
|||
Template.notification.helpers({
|
||||
mode: 'board',
|
||||
isOfActivityType(activityId, type) {
|
||||
const activity = Activities.findOne(activityId);
|
||||
const activity = ReactiveCache.getActivity(activityId);
|
||||
return activity && activity.activityType === type;
|
||||
},
|
||||
activityType(activityId) {
|
||||
const activity = Activities.findOne(activityId);
|
||||
const activity = ReactiveCache.getActivity(activityId);
|
||||
return activity ? activity.activityType : '';
|
||||
},
|
||||
activityUser(activityId) {
|
||||
const activity = Activities.findOne(activityId);
|
||||
const activity = ReactiveCache.getActivity(activityId);
|
||||
return activity && activity.userId;
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue