How to use the esp-js.EventStage function in esp-js

To help you get started, we’ve selected a few esp-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esp / esp-js / examples / esp-chat-react / js / model / eventProcessors / MessageSectionEventProcessor.js View on Github external
MessageSectionEventProcessor.prototype.observeThreadSelected = function () {
    this.addDisposable(modelRouter
        .getEventObservable("threadSelected", esp.EventStage.commited)
        .observe(function (model, event) {
            this._updateMessages(model);
            model.messageSection.threadName = event.threadName;
            model.messageSection.hasChanges = true;
        }.bind(this))
        );
};
github esp / esp-js / examples / esp-chat-react / js / model / eventProcessors / ThreadSectionEventProcessor.js View on Github external
ThreadSectionEventProcessor.prototype.observeThreadSelected = function () {
    this.addDisposable(modelRouter
        .getEventObservable("threadSelected", esp.EventStage.commited)
        .observe(function (model) {
            model.threadSection.threadsById[model.selectedThreadId].isRead = true;
            this._updateActiveFlags(model);
            this._updateUnreadCount(model);
            model.threadSection.hasChanges = true;
        }.bind(this))
        );
};