diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-05-30 15:50:48 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-05-30 15:50:48 +0200 |
commit | f4c80d1315c181300bd37ef5de98c365325bc130 (patch) | |
tree | 811dd0a9bba9bbe49d7e4c360719e72899574783 /client/config | |
parent | 6db01bb3c7bbcf3e5451dd828d3d0932eb5efec3 (diff) | |
download | wekan-f4c80d1315c181300bd37ef5de98c365325bc130.tar.gz wekan-f4c80d1315c181300bd37ef5de98c365325bc130.tar.bz2 wekan-f4c80d1315c181300bd37ef5de98c365325bc130.zip |
Implement presence indicators
Diffstat (limited to 'client/config')
-rw-r--r-- | client/config/router.js | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/client/config/router.js b/client/config/router.js index ed9a069d..8fa74bee 100644 --- a/client/config/router.js +++ b/client/config/router.js @@ -24,6 +24,13 @@ Router.configure({ return this.redirect('atSignIn'); } + // We want to execute our EscapeActions.executeLowerThan method any time the + // route is changed, but not if the stays the same but only the parameters + // change (eg when a user is navigation from a card A to a card B). Iron- + // Router onBeforeAction is a reactive context (which is a bad desig choice + // as explained in + // https://github.com/meteorhacks/flow-router#routercurrent-is-evil) so we + // need to use Tracker.nonreactive Tracker.nonreactive(function() { if (! options.noEscapeActions && ! (previousRoute && previousRoute.options.noEscapeActions)) @@ -35,17 +42,3 @@ Router.configure({ this.next(); } }); - -// We want to execute our EscapeActions.executeLowerThan method any time the -// route is changed, but not if the stays the same but only the parameters -// change (eg when a user is navigation from a card A to a card B). This is why -// we can’t put this function in the above `onBeforeAction` that is being run -// too many times, instead we register a dependency only on the route name and -// use Tracker.autorun. The following paragraph explains the problem quite well: -// https://github.com/meteorhacks/flow-router#routercurrent-is-evil -// Tracker.autorun(function(computation) { -// routeName.get(); -// if (! computation.firstRun) { -// EscapeActions.executeLowerThan('inlinedForm'); -// } -// }); |