From ba9b518d7ef65810583f601912bfa5b42773907b Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 22 May 2015 14:36:05 +0200 Subject: [PATCH] Added subsManager --- rpg-docs/Routes/Routes.js | 6 +++--- rpg-docs/lib/constants/subsManager.js | 1 + rpg-docs/private/changeLogs/changeLogs.js | 8 +++++++- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 rpg-docs/lib/constants/subsManager.js diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index cb35fd4bf..d54b3357d 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -31,7 +31,7 @@ Router.map(function() { this.route("characterList", { path: "/characterList", waitOn: function(){ - return Meteor.subscribe("characterList", Meteor.userId()); + return subsManager.subscribe("characterList", Meteor.userId()); }, data: { characters: function(){ @@ -47,7 +47,7 @@ Router.map(function() { path: "/character/:_id", waitOn: function(){ return [ - Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId()), + subsManager.subscribe("singleCharacter", this.params._id, Meteor.userId()), ]; }, data: function() { @@ -81,7 +81,7 @@ Router.map(function() { name: "changeLog", waitOn: function() { return [ - Meteor.subscribe("changeLog"), + subsManager.subscribe("changeLog"), ] }, data: { diff --git a/rpg-docs/lib/constants/subsManager.js b/rpg-docs/lib/constants/subsManager.js new file mode 100644 index 000000000..6e5de50df --- /dev/null +++ b/rpg-docs/lib/constants/subsManager.js @@ -0,0 +1 @@ +subsManager = new SubsManager(); diff --git a/rpg-docs/private/changeLogs/changeLogs.js b/rpg-docs/private/changeLogs/changeLogs.js index be1fbc621..ea99365cb 100644 --- a/rpg-docs/private/changeLogs/changeLogs.js +++ b/rpg-docs/private/changeLogs/changeLogs.js @@ -114,8 +114,14 @@ ChangeLogs.insert({ "Fixed a bug that caused multiple resistances or vulnerabilities to combine incorrectly", "Added encumbrance effects that automatically apply when carrying too much load", "Added a bunch of UI elements to make your character's current load clear", - "Character data is now chached, swapping between two characters should be faster", "Floating button menus now close as expected when you click a sub-button", "Base values in attribute summaries no longer look like added values" ], }); + +ChangeLogs.insert({ + version: "0.5.1", + changes: [ + "Characters are now cached and should take much faster to load when swapping between them", + ], +});