You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-22 18:41:57 +03:00
Only update analytics when there's a change
Also, the arguments are the previous state, not the new state.
This commit is contained in:
@ -86,8 +86,10 @@ const LeftPanel = React.createClass({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidUpdate(newProps, newState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
Analytics.setBreadcrumbs(newState.breadcrumbs);
|
if (prevState.breadcrumbs !== this.state.breadcrumbs) {
|
||||||
|
Analytics.setBreadcrumbs(this.state.breadcrumbs);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onBreadcrumbsChanged: function(settingName, roomId, level, valueAtLevel, value) {
|
_onBreadcrumbsChanged: function(settingName, roomId, level, valueAtLevel, value) {
|
||||||
|
Reference in New Issue
Block a user