[Flux] Locale data flow converted to Flux

This commit is contained in:
Peter Cottle 2015-03-28 11:30:42 -07:00
parent b4a6ac3784
commit 1afd48bb39
8 changed files with 45 additions and 69 deletions

View file

@ -2,6 +2,7 @@ var _ = require('underscore');
var Q = require('q');
// horrible hack to get localStorage Backbone plugin
var Backbone = (!require('../util').isBrowser()) ? require('backbone') : window.Backbone;
var LocaleStore = require('../stores/LocaleStore');
var util = require('../util');
var intl = require('../intl');
@ -71,7 +72,7 @@ var LevelDropdownView = ContainedBase.extend({
this.render();
Main.getEvents().on('resetMapSolved', this.render, this);
Main.getEvents().on('localeChanged', this.render, this);
LocaleStore.subscribe(this.render.bind(this));
if (!options.wait) {
this.show();