mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
added comment section on card details to avoid loading the card comment activities from the server
- and added to show only the activities a card - to display the card comments a connection to the server was needed to get the activities of the card comments, now, it's not necessary - also performance relevant. until now there were a lot of activities loaded, now only of the current card
This commit is contained in:
parent
0196f46094
commit
8a446de3e9
21 changed files with 329 additions and 266 deletions
|
|
@ -1457,3 +1457,19 @@ Migrations.add('remove-unused-planning-poker', () => {
|
|||
noValidateMulti,
|
||||
);
|
||||
});
|
||||
|
||||
Migrations.add('remove-user-profile-hiddenSystemMessages', () => {
|
||||
Users.update(
|
||||
{
|
||||
"profile.hiddenSystemMessages": {
|
||||
$exists: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$unset: {
|
||||
"profile.hiddenSystemMessages": 1,
|
||||
},
|
||||
},
|
||||
noValidateMulti,
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
|
|||
// 2. The card activity tab
|
||||
// We use this publication to paginate for these two publications.
|
||||
|
||||
Meteor.publish('activities', (kind, id, limit, hideSystem) => {
|
||||
Meteor.publish('activities', (kind, id, limit, showActivities) => {
|
||||
check(
|
||||
kind,
|
||||
Match.Where(x => {
|
||||
|
|
@ -14,7 +14,7 @@ Meteor.publish('activities', (kind, id, limit, hideSystem) => {
|
|||
);
|
||||
check(id, String);
|
||||
check(limit, Number);
|
||||
check(hideSystem, Boolean);
|
||||
check(showActivities, Boolean);
|
||||
|
||||
// Get linkedBoard
|
||||
let linkedElmtId = [id];
|
||||
|
|
@ -27,12 +27,9 @@ Meteor.publish('activities', (kind, id, limit, hideSystem) => {
|
|||
});
|
||||
}
|
||||
|
||||
//const selector = hideSystem
|
||||
// ? { $and: [{ activityType: 'addComment' }, { [`${kind}Id`]: id }] }
|
||||
// : { [`${kind}Id`]: id };
|
||||
const selector = hideSystem
|
||||
? { $and: [{ activityType: 'addComment' }, { [`${kind}Id`]: { $in: linkedElmtId } }] }
|
||||
: { [`${kind}Id`]: { $in: linkedElmtId } };
|
||||
const selector = showActivities
|
||||
? { [`${kind}Id`]: { $in: linkedElmtId } }
|
||||
: { $and: [{ activityType: 'addComment' }, { [`${kind}Id`]: { $in: linkedElmtId } }] };
|
||||
const ret = ReactiveCache.getActivities(selector,
|
||||
{
|
||||
limit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue