Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix Community Panel preference not taking effect until some refreshing #3517

Merged
merged 2 commits into from
Oct 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/structures/LeftPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const LeftPanel = createReactClass({

this._settingWatchRef = SettingsStore.watchSetting(
"breadcrumbs", null, this._onBreadcrumbsChanged);
this._settingWatchRef1 = SettingsStore.watchSetting(
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
"TagPanel.enableTagPanel", null, () => this.forceUpdate());

const useBreadcrumbs = !!SettingsStore.getValue("breadcrumbs");
Analytics.setBreadcrumbs(useBreadcrumbs);
Expand All @@ -62,6 +64,7 @@ const LeftPanel = createReactClass({

componentWillUnmount: function() {
SettingsStore.unwatchSetting(this._settingWatchRef);
SettingsStore.unwatchSetting(this._settingWatchRef1);
},

shouldComponentUpdate: function(nextProps, nextState) {
Expand Down