This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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+
2325var React = require ( "react" ) ;
2426var ReactDOM = require ( "react-dom" ) ;
2527import 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 } ) ;
You can’t perform that action at this time.
0 commit comments