diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 704ae228be..8b9ada14e7 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -20,7 +20,6 @@ import dis from "../../dispatcher"; import sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; -import UserSettingsStore from '../../UserSettingsStore'; const MILLIS_IN_DAY = 86400000; @@ -94,6 +93,9 @@ module.exports = React.createClass({ // hide redacted events as per old behaviour hideRedactions: React.PropTypes.bool, + + // hide membership joins and parts + hideJoinLeaves: React.PropTypes.bool, }, componentWillMount: function() { @@ -273,7 +275,7 @@ module.exports = React.createClass({ // this only applies to joins/leaves not invites/kicks/bans const isJoinOrLeave = membership === "join" || (membership === "leave" && mxEv.getStateKey() === mxEv.getSender()); - const hideJoinLeavesGlobally = UserSettingsStore.getSyncedSetting("hideJoinLeaves", false); + const hideJoinLeavesGlobally = this.props.hideJoinLeaves; if (isJoinOrLeave && hideJoinLeavesGlobally) { return false; } diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 928e2405aa..9642887fd5 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -184,6 +184,9 @@ var TimelinePanel = React.createClass({ // hide redacted events as per old behaviour hideRedactions: syncedSettings.hideRedactions, + + // hide membership joins and leaves + hideJoinLeaves: syncedSettings.hideJoinLeaves, }; }, @@ -1122,6 +1125,7 @@ var TimelinePanel = React.createClass({ return (