hide emoji on unmount chat

This commit is contained in:
Andrey Shovkoplyas 2017-01-25 20:15:06 +03:00 committed by Roman Volosovskyi
parent ccd846eb44
commit 191257ba13
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@
show-emoji? [:chat-ui-props :show-emoji?] show-emoji? [:chat-ui-props :show-emoji?]
command? [:command?] command? [:command?]
layout-height [:get :layout-height]] layout-height [:get :layout-height]]
{:component-did-mount #(dispatch [:check-autorun])} {:component-did-mount #(dispatch [:check-autorun])
:component-will-unmount #(dispatch [:set-chat-ui-props :show-emoji? false])}
[view {:style st/chat-view [view {:style st/chat-view
:onLayout (fn [event] :onLayout (fn [event]
(let [height (.. event -nativeEvent -layout -height)] (let [height (.. event -nativeEvent -layout -height)]