File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ const Chat = (props) => {
112112
113113 const componentJustMounted = useRef ( true ) ;
114114
115- this . timer = null
115+ let timer = null
116116 useEffect ( ( ) => {
117117 setSelectedUri ( props . focusOn ) ;
118118 } , [ props . focusOn ] ) ;
@@ -359,10 +359,10 @@ const Chat = (props) => {
359359 timestamp ,
360360 state
361361 ) ;
362- if ( this . timer !== null ) {
363- clearTimeout ( this . timer ) ;
362+ if ( timer !== null ) {
363+ clearTimeout ( timer ) ;
364364 }
365- this . timer = setTimeout ( ( ) => {
365+ timer = setTimeout ( ( ) => {
366366 let sendMark = true ;
367367 for ( let message of messages [ uri ] ) {
368368 if ( message . state === 'received'
@@ -381,7 +381,7 @@ const Chat = (props) => {
381381 setUnread ( uri )
382382 }
383383 props . account . markConversationRead ( uri ) ;
384- this . timer = null ;
384+ timer = null ;
385385 }
386386 } , 500 ) ;
387387 } ;
You can’t perform that action at this time.
0 commit comments