Improved PreferenceStore api when getting values

Этот коммит содержится в:
hmhealey
2015-12-15 11:36:14 -05:00
родитель 2980a56370
Коммит e4899fa551
12 изменённых файлов: 79 добавлений и 36 удалений

Просмотреть файл

@@ -27,7 +27,7 @@ import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import Constants from '../utils/constants.jsx';
function onPreferenceChange() {
const selectedFont = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'selected_font', {value: Constants.DEFAULT_FONT}).value;
const selectedFont = PreferenceStore.get(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'selected_font', Constants.DEFAULT_FONT);
Utils.applyFont(selectedFont);
PreferenceStore.removeChangeListener(onPreferenceChange);
}