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.
20
20
// - Drag and drop
21
21
// - File uploading - uploadFile()
22
22
23
+ import shouldHideEvent from "../../shouldHideEvent" ;
24
+
23
25
var React = require ( "react" ) ;
24
26
var ReactDOM = require ( "react-dom" ) ;
25
27
import Promise from 'bluebird' ;
@@ -143,6 +145,8 @@ module.exports = React.createClass({
143
145
MatrixClientPeg . get ( ) . on ( "RoomMember.membership" , this . onRoomMemberMembership ) ;
144
146
MatrixClientPeg . get ( ) . on ( "accountData" , this . onAccountData ) ;
145
147
148
+ this . _syncedSettings = UserSettingsStore . getSyncedSettings ( ) ;
149
+
146
150
// Start listening for RoomViewStore updates
147
151
this . _roomStoreToken = RoomViewStore . addListener ( this . _onRoomViewStoreUpdate ) ;
148
152
this . _onRoomViewStoreUpdate ( true ) ;
@@ -497,8 +501,7 @@ module.exports = React.createClass({
497
501
// update unread count when scrolled up
498
502
if ( ! this . state . searchResults && this . state . atEndOfLiveTimeline ) {
499
503
// no change
500
- }
501
- else {
504
+ } else if ( ! shouldHideEvent ( ev , this . _syncedSettings ) ) {
502
505
this . setState ( ( state , props ) => {
503
506
return { numUnreadMessages : state . numUnreadMessages + 1 } ;
504
507
} ) ;
You can’t perform that action at this time.
0 commit comments