hiding of param's suggestions
This commit is contained in:
parent
9179cc61b4
commit
ecd7ae26b8
|
@ -269,8 +269,7 @@
|
|||
[messages-container
|
||||
[messages-view group-chat]]
|
||||
(when group-chat [typing-all])
|
||||
(cond
|
||||
command? [response-view]
|
||||
:else [suggestions-view])
|
||||
[response-view]
|
||||
(when-not command? [suggestions-view])
|
||||
[chat-message-new]
|
||||
(when show-actions-atom [actions-view])])
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
(ns status-im.chat.views.message-input
|
||||
(:require-macros [status-im.utils.views :refer [defview]])
|
||||
(:require [re-frame.core :refer [subscribe dispatch]]
|
||||
[reagent.core :as r]
|
||||
(:require [re-frame.core :refer [subscribe]]
|
||||
[status-im.components.react :refer [view
|
||||
animated-view
|
||||
icon
|
||||
touchable-highlight
|
||||
text-input
|
||||
dismiss-keyboard!]]
|
||||
[status-im.components.animation :as anim]
|
||||
text-input]]
|
||||
[status-im.chat.views.plain-message :as plain-message]
|
||||
[status-im.chat.views.command :as command]
|
||||
[status-im.chat.styles.message-input :as st]
|
||||
[status-im.chat.styles.plain-message :as st-message]
|
||||
[status-im.chat.styles.response :as st-response]
|
||||
[status-im.constants :refer [response-input-hiding-duration]]))
|
||||
[status-im.chat.styles.response :as st-response]))
|
||||
|
||||
(defn send-button [{:keys [on-press accessibility-label]}]
|
||||
[touchable-highlight {:on-press on-press
|
||||
|
@ -22,15 +18,6 @@
|
|||
[view st/send-container
|
||||
[icon :send st/send-icon]]])
|
||||
|
||||
(defn animation-logic [{:keys [to-value val]}]
|
||||
(fn [_]
|
||||
(let [to-value @to-value]
|
||||
(anim/start (anim/timing val {:toValue to-value
|
||||
:duration response-input-hiding-duration})
|
||||
(fn [arg]
|
||||
(when (.-finished arg)
|
||||
(dispatch [:set-animation ::message-input-offset-current to-value])))))))
|
||||
|
||||
(defn message-input-container [input]
|
||||
[view st/message-input-container input])
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
(let [to-scale (if @command? 0 1)]
|
||||
(when-not @command? (anim/set-value width 56))
|
||||
(anim/start (anim/spring val {:toValue to-scale})
|
||||
(fn []
|
||||
(when @command?
|
||||
(fn [e]
|
||||
(when (and @command? (.-finished e))
|
||||
(anim/set-value width 0.1)))))))
|
||||
|
||||
(defn smile-button []
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
(defn container-animation-logic [{:keys [to-value val]}]
|
||||
(fn [_]
|
||||
(println :to @to-value)
|
||||
(let [to-value @to-value]
|
||||
(anim/start (anim/spring val {:toValue to-value})))))
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
:whisper-identity ""
|
||||
:phone-number ""}
|
||||
:disable-group-creation false
|
||||
:animations {:to-response-height nil
|
||||
:animations {:to-response-height 0.1
|
||||
:response-height-current nil
|
||||
:command? false
|
||||
:messages-offset 0
|
||||
|
|
Loading…
Reference in New Issue