#351 - using listenToOnce to get rid of redundant calls

This commit is contained in:
Jason 2017-10-25 17:11:54 -06:00
parent 74218de135
commit c6f1c5cd2a

View File

@ -74,7 +74,7 @@ define(['jquery',
this.loadLesson = function(name,pageNum) { this.loadLesson = function(name,pageNum) {
if (this.name === name) { if (this.name === name) {
this.listenTo(this.lessonHintView, 'hints:showButton', this.onShowHintsButton); this.listenToOnce(this.lessonHintView, 'hints:showButton', this.onShowHintsButton);
this.listenTo(this.lessonHintView, 'hints:hideButton', this.onHideHintsButton); this.listenTo(this.lessonHintView, 'hints:hideButton', this.onHideHintsButton);
this.lessonContentView.navToPage(pageNum); this.lessonContentView.navToPage(pageNum);
this.lessonHintView.hideHints(); this.lessonHintView.hideHints();