mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
[#14877] No ability to type the text into textbox if image is added [#14881] Input field is hidden in composer (#14911)
This commit is contained in:
parent
85fc754104
commit
6002672e7c
@ -1,6 +1,5 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.record-button-big
|
||||
(:require [quo.react :refer [memo]]
|
||||
[quo2.components.icon :as icons]
|
||||
(:require [quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn :refer [use-effect]]
|
||||
@ -34,7 +33,7 @@
|
||||
|
||||
(def ^:private animated-ring
|
||||
(reagent/adapt-react-class
|
||||
(memo
|
||||
(rn/memo
|
||||
(fn [props]
|
||||
(let [{:keys [scale opacity color]} (bean/bean props)]
|
||||
(reagent/as-element
|
||||
|
@ -1,7 +1,6 @@
|
||||
(ns quo2.components.record-audio.record-audio.view
|
||||
(:require [cljs-bean.core :as bean]
|
||||
[oops.core :as oops]
|
||||
[quo.react :refer [memo]]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
@ -518,7 +517,7 @@
|
||||
|
||||
(def record-audio
|
||||
(reagent/adapt-react-class
|
||||
(memo
|
||||
(rn/memo
|
||||
(fn [props]
|
||||
(let [{:keys [onStartRecording onReviewingAudio onSend onCancel]} (bean/bean props)]
|
||||
(reagent/as-element
|
||||
|
@ -88,6 +88,8 @@
|
||||
props)]
|
||||
children))
|
||||
|
||||
(def memo react/memo)
|
||||
|
||||
(def create-ref react/createRef)
|
||||
|
||||
(def use-ref react/useRef)
|
||||
|
@ -118,7 +118,7 @@
|
||||
[mentions/autocomplete-mentions suggestions (:text-input-ref refs)]]))])
|
||||
|
||||
(defn effect!
|
||||
[{:keys [keyboard-shown] :as params}]
|
||||
[{:keys [keyboard-shown reply edit suggestions images] :as params}]
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(when (or (not @keyboard-hiding?)
|
||||
@ -126,7 +126,8 @@
|
||||
(reset! keyboard-hiding? false)
|
||||
(if (not keyboard-shown)
|
||||
(minimize params)
|
||||
(update-y params))))))
|
||||
(update-y params))))
|
||||
[reply edit suggestions images]))
|
||||
|
||||
(defn prepare-params
|
||||
[[refs window-height translate-y bg-opacity bg-bottom min-y max-y parent-height
|
||||
|
@ -21,18 +21,18 @@
|
||||
(fn []
|
||||
(let [shared-element-id (rf/sub [:shared-element-id])]
|
||||
[rn/touchable-opacity
|
||||
{:active-opacity 1
|
||||
:style {:margin-top (when (> index 0) 20)}
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:chat.ui/update-shared-element-id message-id])
|
||||
(js/setTimeout #(rf/dispatch [:chat.ui/navigate-to-horizontal-images
|
||||
[message] 0])
|
||||
100))
|
||||
:on-long-press on-long-press}
|
||||
;; This text comp is temporary. Should later use
|
||||
;; `status-im2.contexts.chat.messages.content.text.view`
|
||||
(when (and (not= text "placeholder") (= index 0)) [rn/text text])
|
||||
[rn/image
|
||||
{:source {:uri (:image content)}
|
||||
:style (merge dimensions {:border-radius 12})
|
||||
:native-ID (when (= shared-element-id message-id) :shared-element)}]]))))
|
||||
{:style {:margin-top (when (> index 0) 20) :width (:width dimensions)}
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:chat.ui/update-shared-element-id message-id])
|
||||
(js/setTimeout #(rf/dispatch [:chat.ui/navigate-to-horizontal-images
|
||||
[message] 0])
|
||||
100))
|
||||
:on-long-press on-long-press}
|
||||
[rn/view
|
||||
;; This text comp is temporary. Should later use
|
||||
;; `status-im2.contexts.chat.messages.content.text.view`
|
||||
(when (and (not= text "placeholder") (= index 0)) [rn/text text])
|
||||
[rn/image
|
||||
{:source {:uri (:image content)}
|
||||
:style (merge dimensions {:border-radius 12})
|
||||
:native-ID (when (= shared-element-id message-id) :shared-element)}]]]))))
|
||||
|
@ -28,7 +28,9 @@
|
||||
(let [response-to (:response-to (:content message))
|
||||
default-size 36]
|
||||
[rn/touchable-opacity
|
||||
{:on-press #(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list chat-id])
|
||||
{:on-press #(do
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list chat-id]))
|
||||
:active-opacity 1
|
||||
:style (merge {:flex-direction :row :margin-vertical 8}
|
||||
(old-style/message-wrapper message))}
|
||||
|
@ -68,6 +68,7 @@
|
||||
|
||||
(defn message-on-long-press
|
||||
[message-data context]
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (drawers/reactions-and-actions message-data context)}]))
|
||||
|
||||
@ -79,6 +80,7 @@
|
||||
[rn/touchable-highlight
|
||||
{:underlay-color (colors/theme-colors colors/neutral-5 colors/neutral-90)
|
||||
:style {:border-radius 16}
|
||||
:on-press #(rf/dispatch [:dismiss-keyboard])
|
||||
:on-long-press #(message-on-long-press message-data context)}
|
||||
[rn/view {:padding-vertical 8}
|
||||
(when (and (seq response-to) quoted-message)
|
||||
|
@ -15,6 +15,8 @@
|
||||
[quo/banner
|
||||
{:latest-pin-text latest-pin-text
|
||||
:pins-count pins-count
|
||||
:on-press #(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list chat-id])}]))
|
||||
:on-press #(do
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list chat-id]))}]))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user