diff --git a/src/app/atoms/modal/RawModal.jsx b/src/app/atoms/modal/RawModal.jsx index 995ac60..31693cd 100644 --- a/src/app/atoms/modal/RawModal.jsx +++ b/src/app/atoms/modal/RawModal.jsx @@ -4,6 +4,8 @@ import './RawModal.scss'; import Modal from 'react-modal'; +import navigation from '../../../client/state/navigation'; + Modal.setAppElement('#root'); function RawModal({ @@ -23,6 +25,9 @@ function RawModal({ default: modalClass += 'raw-modal__small '; } + + navigation.setIsRawModalVisible(isOpen); + const modalOverlayClass = (overlayClassName !== null) ? `${overlayClassName} ` : ''; return ( 10) { this.recentRooms.splice(0, 1); } } + setIsRawModalVisible(visible) { + this.isRawModalVisible = visible; + } + navigate(action) { const actions = { [cons.actions.navigation.SELECT_TAB]: () => { @@ -69,6 +74,7 @@ class Navigation extends EventEmitter { [cons.actions.navigation.SELECT_ROOM]: () => { const prevSelectedRoomId = this.selectedRoomId; this.selectedRoomId = action.roomId; + this.removeRecentRoom(prevSelectedRoomId); this.addRecentRoom(prevSelectedRoomId); this.removeRecentRoom(this.selectedRoomId); this.emit(