Fix Community Panel preference not taking effect until some refreshing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-10-03 22:13:10 +01:00
parent 359d2fee5f
commit d5f6d781bb

View file

@ -54,6 +54,8 @@ const LeftPanel = createReactClass({
this._settingWatchRef = SettingsStore.watchSetting( this._settingWatchRef = SettingsStore.watchSetting(
"breadcrumbs", null, this._onBreadcrumbsChanged); "breadcrumbs", null, this._onBreadcrumbsChanged);
this._settingWatchRef1 = SettingsStore.watchSetting(
"TagPanel.enableTagPanel", null, () => this.forceUpdate());
const useBreadcrumbs = !!SettingsStore.getValue("breadcrumbs"); const useBreadcrumbs = !!SettingsStore.getValue("breadcrumbs");
Analytics.setBreadcrumbs(useBreadcrumbs); Analytics.setBreadcrumbs(useBreadcrumbs);
@ -62,6 +64,7 @@ const LeftPanel = createReactClass({
componentWillUnmount: function() { componentWillUnmount: function() {
SettingsStore.unwatchSetting(this._settingWatchRef); SettingsStore.unwatchSetting(this._settingWatchRef);
SettingsStore.unwatchSetting(this._settingWatchRef1);
}, },
shouldComponentUpdate: function(nextProps, nextState) { shouldComponentUpdate: function(nextProps, nextState) {