Use the wiki event mechanism to dispatch lazyLoad notifications to syncers

We're trying to get to the point where wiki.js doesn't know about
syncers
This commit is contained in:
Jeremy Ruston
2013-03-16 10:50:36 +00:00
parent c3b57507b0
commit 854e8d7083
2 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -628,8 +628,8 @@ exports.getTiddlerText = function(title,defaultText) {
// Just return the text if we've got it
return tiddler.fields.text;
} else {
// Ask all the syncers to load the tiddler if they can
this.invokeSyncers("lazyLoad",title,tiddler);
// Tell any listeners about the need to lazily load this tiddler
this.dispatchEvent("lazyLoad",title);
// Indicate that the text is being loaded
return null;
}