From: Ajay Bura Date: Sat, 11 Dec 2021 05:20:34 +0000 (+0530) Subject: Add hotkey ctrl+k for search X-Git-Tag: v1.6.0~14 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=fbeecc047918701c08289176d7765ff03fbd3738;p=rainny.git Add hotkey ctrl+k for search Signed-off-by: Ajay Bura --- 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(