How to use the matrix-react-sdk/lib/dispatcher.unregister function in matrix-react-sdk

To help you get started, we’ve selected a few matrix-react-sdk 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 vector-im / riot-web / test / app-tests / loading.js View on Github external
const onAction = ({ action }) => {
            if (action !== "on_logged_in") {
                return;
            }
            console.log(Date.now() + ": Received on_logged_in action");
            dis.unregister(dispatcherRef);
            resolve();
        };
        const dispatcherRef = dis.register(onAction);
github vector-im / riot-web / src / components / structures / BottomLeftMenu.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this._dispatcherRef);
    },
github vector-im / riot-web / src / controllers / molecules / voip / CallView.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
    },
github vector-im / riot-web / src / controllers / organisms / RoomView.js View on Github external
componentWillUnmount: function() {
        if (this.refs.messagePanel) {
            var messagePanel = ReactDOM.findDOMNode(this.refs.messagePanel);
            messagePanel.removeEventListener('drop', this.onDrop);
            messagePanel.removeEventListener('dragover', this.onDragOver);
            messagePanel.removeEventListener('dragleave', this.onDragLeaveOrEnd);
            messagePanel.removeEventListener('dragend', this.onDragLeaveOrEnd);
        }
        dis.unregister(this.dispatcherRef);
        if (MatrixClientPeg.get()) {
            MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
            MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
            MatrixClientPeg.get().removeListener("Room.receipt", this.onRoomReceipt);
            MatrixClientPeg.get().removeListener("RoomMember.typing", this.onRoomMemberTyping);
            MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
            MatrixClientPeg.get().removeListener("sync", this.onSyncStateChange);
        }
    },
github vector-im / riot-web / src / controllers / organisms / RoomList.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
        if (MatrixClientPeg.get()) {
            MatrixClientPeg.get().removeListener("Room", this.onRoom);
            MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
            MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
            MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
        }
    },
github vector-im / riot-web / src / components / views / settings / IntegrationsManager.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
        document.removeEventListener("keydown", this.onKeyDown);
    },
github vector-im / riot-web / src / components / structures / LeftPanel.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
    },
github vector-im / riot-web / src / components / structures / login / Registration.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
    },
github vector-im / riot-web / src / components / structures / RightPanel.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
        if (MatrixClientPeg.get()) {
            MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
        }
    },
github vector-im / riot-web / src / components / structures / SearchBox.js View on Github external
componentWillUnmount: function() {
        dis.unregister(this.dispatcherRef);
        document.removeEventListener('keydown', this._onKeyDown);
    },