insertIntoStore_(destination) {
      const key = this.getKey_(destination);
      const existingDestination = this.destinationMap_[key];
      if (existingDestination == null) {
        destination.isRecent = destination.isRecent ||
            this.recentDestinations_.some(function(recent) {
              return (
                  destination.id == recent.id &&
                  destination.origin == recent.origin);
            }, this);
        this.destinations_.push(destination);
        this.destinationMap_[key] = destination;
        return true;
      }
      if (existingDestination.connectionStatus ==
              print_preview.DestinationConnectionStatus.UNKNOWN &&
          destination.connectionStatus !=
              print_preview.DestinationConnectionStatus.UNKNOWN) {
        existingDestination.connectionStatus = destination.connectionStatus;
        return true;
      }
      return false;
    }
/**
     * Inserts a destination into the store without dispatching any events.
     * @param {!print_preview.Destination} destination The destination to be
     *     inserted.
     * @return {boolean} Whether the inserted destination was not already in the
     *     store.
     * @private
     */
Inserts a destination into the store without dispatching any events.
@param {!print_preview.Destination} destination The destination to be
inserted.
@return {boolean} Whether the inserted destination was not already in the
store.
@private
Inserts a destination into the store without dispatching any events . @param { !print_preview . Destination } destination The destination to be inserted . @return { boolean } Whether the inserted destination was not already in the store . @private
insertIntoStore_(destination) {
      const key = this.getKey_(destination);
      const existingDestination = this.destinationMap_[key];
      if (existingDestination == null) {
        destination.isRecent = destination.isRecent ||
            this.recentDestinations_.some(function(recent) {
              return (
                  destination.id == recent.id &&
                  destination.origin == recent.origin);
            }, this);
        this.destinations_.push(destination);
        this.destinationMap_[key] = destination;
        return true;
      }
      if (existingDestination.connectionStatus ==
              print_preview.DestinationConnectionStatus.UNKNOWN &&
          destination.connectionStatus !=
              print_preview.DestinationConnectionStatus.UNKNOWN) {
        existingDestination.connectionStatus = destination.connectionStatus;
        return true;
      }
      return false;
    }
insertIntoStore_ ( destination ) { const key = this . getKey_ ( destination ) ; const existingDestination = this . destinationMap_ [ key ] ; if ( existingDestination == null ) { destination . isRecent = destination . isRecent || this . recentDestinations_ . some ( function ( recent ) { return ( destination . id == recent . id && destination . origin == recent . origin ) ; } , this ) ; this . destinations_ . push ( destination ) ; this . destinationMap_ [ key ] = destination ; return true ; } if ( existingDestination . connectionStatus == print_preview . DestinationConnectionStatus . UNKNOWN && destination . connectionStatus != print_preview . DestinationConnectionStatus . UNKNOWN ) { existingDestination . connectionStatus = destination . connectionStatus ; return true ; } return false ; }
Inserts a destination into the store without dispatching any events.
Inserts a destination into the store without dispatching any events .