src/ui/components/layer-message-list/layer-message-item-mixin.js
function onRender() {
      try {

        // Setup the layer-sender-name
        if (this.nodes.sender) {
          this.nodes.sender.innerHTML = this.item.sender.displayName;
        }

        if (this.nodes.avatar) {
          this.nodes.avatar.users = [this.item.sender];
        }

        // Setup the layer-date
        if (this.nodes.date && !this.item.isNew()) {
          if (this.dateRenderer) this.nodes.date.dateRenderer = this.dateRenderer;
          this.nodes.date.date = this.item.sentAt;
        }

        // Setup the layer-message-status
        if (this.nodes.status && this.messageStatusRenderer) {
          this.nodes.status.messageStatusRenderer = this.messageStatusRenderer;
        }

        // Setup the layer-delete
        if (this.nodes.delete) {
          this.nodes.delete.enabled = this.getDeleteEnabled ? this.getDeleteEnabled(this.properties.item) : true;
        }

        // Generate the renderer for this Message's MessageParts.
        this._applyContentTag();

        // Render all mutable data
        this.onRerender();
      } catch (err) {
        logger.error('layer-message-item.render(): ', err);
      }
    }
function onRender() {
      try {

        // Setup the layer-sender-name
        if (this.nodes.sender) {
          this.nodes.sender.innerHTML = this.item.sender.displayName;
        }

        if (this.nodes.avatar) {
          this.nodes.avatar.users = [this.item.sender];
        }

        // Setup the layer-date
        if (this.nodes.date && !this.item.isNew()) {
          if (this.dateRenderer) this.nodes.date.dateRenderer = this.dateRenderer;
          this.nodes.date.date = this.item.sentAt;
        }

        // Setup the layer-message-status
        if (this.nodes.status && this.messageStatusRenderer) {
          this.nodes.status.messageStatusRenderer = this.messageStatusRenderer;
        }

        // Setup the layer-delete
        if (this.nodes.delete) {
          this.nodes.delete.enabled = this.getDeleteEnabled ? this.getDeleteEnabled(this.properties.item) : true;
        }

        // Generate the renderer for this Message's MessageParts.
        this._applyContentTag();

        // Render all mutable data
        this.onRerender();
      } catch (err) {
        logger.error('layer-message-item.render(): ', err);
      }
    }
function onRender ( ) { try { // Setup the layer-sender-name if ( this . nodes . sender ) { this . nodes . sender . innerHTML = this . item . sender . displayName ; } if ( this . nodes . avatar ) { this . nodes . avatar . users = [ this . item . sender ] ; } // Setup the layer-date if ( this . nodes . date && ! this . item . isNew ( ) ) { if ( this . dateRenderer ) this . nodes . date . dateRenderer = this . dateRenderer ; this . nodes . date . date = this . item . sentAt ; } // Setup the layer-message-status if ( this . nodes . status && this . messageStatusRenderer ) { this . nodes . status . messageStatusRenderer = this . messageStatusRenderer ; } // Setup the layer-delete if ( this . nodes . delete ) { this . nodes . delete . enabled = this . getDeleteEnabled ? this . getDeleteEnabled ( this . properties . item ) : true ; } // Generate the renderer for this Message's MessageParts. this . _applyContentTag ( ) ; // Render all mutable data this . onRerender ( ) ; } catch ( err ) { logger . error ( 'layer-message-item.render(): ' , err ) ; } }
Lifecycle method sets up the Message to render
Lifecycle method sets up the Message to render