summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-12-02 22:00:42 +0200
committerLauri Ojansivu <x@xet7.org>2017-12-02 22:00:42 +0200
commit233554a3d69f1cf3a509e540fc1623d17c357037 (patch)
tree0321320f8be205aaf558b8912c4d63f98fa40639 /client/components/cards
parentfa281e3f5f7362797224c0eb11faec26351a407d (diff)
downloadwekan-233554a3d69f1cf3a509e540fc1623d17c357037.tar.gz
wekan-233554a3d69f1cf3a509e540fc1623d17c357037.tar.bz2
wekan-233554a3d69f1cf3a509e540fc1623d17c357037.zip
Move global subscription to template subscription so that subscription
will stop when template is unused. It's very important for efficiency espacially with large number of users. Thanks to mfshiu !
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/cardDetails.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index b62f31d4..e18de87c 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -23,8 +23,12 @@ BlazeComponent.extendComponent({
this.parentComponent().showOverlay.set(true);
this.parentComponent().mouseHasEnterCardDetails = false;
this.calculateNextPeak();
+
+ Meteor.subscribe('unsaved-edits');
},
+
+
isWatching() {
const card = this.currentData();
return card.findWatcher(Meteor.userId());