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

Commit 32b33c6

Browse files
authored
Merge pull request #1346 from matrix-org/t3chguy/shouldHideEvent_RoomStatusBar
apply shouldHideEvent fn to onRoomTimeline for RoomStatusBar
2 parents b13ae76 + 315f7a3 commit 32b33c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/structures/RoomView.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ limitations under the License.
2020
// - Drag and drop
2121
// - File uploading - uploadFile()
2222

23+
import shouldHideEvent from "../../shouldHideEvent";
24+
2325
var React = require("react");
2426
var ReactDOM = require("react-dom");
2527
import Promise from 'bluebird';
@@ -143,6 +145,8 @@ module.exports = React.createClass({
143145
MatrixClientPeg.get().on("RoomMember.membership", this.onRoomMemberMembership);
144146
MatrixClientPeg.get().on("accountData", this.onAccountData);
145147

148+
this._syncedSettings = UserSettingsStore.getSyncedSettings();
149+
146150
// Start listening for RoomViewStore updates
147151
this._roomStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdate);
148152
this._onRoomViewStoreUpdate(true);
@@ -497,8 +501,7 @@ module.exports = React.createClass({
497501
// update unread count when scrolled up
498502
if (!this.state.searchResults && this.state.atEndOfLiveTimeline) {
499503
// no change
500-
}
501-
else {
504+
} else if (!shouldHideEvent(ev, this._syncedSettings)) {
502505
this.setState((state, props) => {
503506
return {numUnreadMessages: state.numUnreadMessages + 1};
504507
});

0 commit comments

Comments
 (0)