@@ -115,7 +115,7 @@ export class WidgetModel extends Backbone.Model {
115115 attributes : Backbone . ObjectHash ,
116116 options : IBackboneModelOptions
117117 ) : void {
118- this . attrLastUpdateMsgId = { } ;
118+ this . expectedEchoMsgIds = { } ;
119119 this . attrsToUpdate = new Set < string > ( ) ;
120120
121121 super . initialize ( attributes , options ) ;
@@ -235,19 +235,19 @@ export class WidgetModel extends Backbone.Model {
235235 // we may have echos coming from other clients, we only care about
236236 // dropping echos for which we expected a reply
237237 const expectedEcho = data . echo . filter ( ( attrName : string ) =>
238- Object . keys ( this . attrLastUpdateMsgId ) . includes ( attrName )
238+ Object . keys ( this . expectedEchoMsgIds ) . includes ( attrName )
239239 ) ;
240240 expectedEcho . forEach ( ( attrName : string ) => {
241241 // we don't care about the old messages, only the one send with the
242242 // last msgId
243243 const isOldMessage =
244- this . attrLastUpdateMsgId [ attrName ] !== msgId ;
244+ this . expectedEchoMsgIds [ attrName ] !== msgId ;
245245 if ( isOldMessage ) {
246246 // get rid of old updates
247247 delete state [ attrName ] ;
248248 } else {
249249 // we got our confirmation, from now on we accept everything
250- delete this . attrLastUpdateMsgId [ attrName ] ;
250+ delete this . expectedEchoMsgIds [ attrName ] ;
251251 // except, we plan to send out a new state for this soon, so we will
252252 // also ignore the update for this property
253253 if (
@@ -499,7 +499,7 @@ export class WidgetModel extends Backbone.Model {
499499 }
500500 rememberLastUpdateFor ( msgId : string ) {
501501 [ ...this . attrsToUpdate ] . forEach ( ( attrName ) => {
502- this . attrLastUpdateMsgId [ attrName ] = msgId ;
502+ this . expectedEchoMsgIds [ attrName ] = msgId ;
503503 } ) ;
504504 this . attrsToUpdate = new Set < string > ( ) ;
505505 }
@@ -679,7 +679,7 @@ export class WidgetModel extends Backbone.Model {
679679 // keep track of the msg id for each attr for updates we send out so
680680 // that we can ignore old messages that we send in order to avoid
681681 // 'drunken' sliders going back and forward
682- private attrLastUpdateMsgId : any ;
682+ private expectedEchoMsgIds : any ;
683683 // because we don't know the attrs in _handle_status, we keep track of what we will send
684684 private attrsToUpdate : Set < string > ;
685685}
0 commit comments