Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong composer opacity with minimised keyboard when editing message #20348

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/status_im/contexts/chat/messenger/composer/effects.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@
(reset! gesture-enabled? false)))

(defn empty-effect
[{:keys [empty-input?]}
{:keys [input-text images link-previews? reply audio]}]
[{:keys [empty-input?]} subscriptions]
(reanimated/set-shared-value
empty-input?
(utils/empty-input? input-text images link-previews? reply audio)))
(utils/empty-input? subscriptions)))

(defn component-will-unmount
[{:keys [keyboard-show-listener keyboard-hide-listener keyboard-frame-listener]}]
Expand All @@ -90,7 +89,7 @@

(defn initialize
[props state animations {:keys [max-height] :as dimensions}
{:keys [chat-input audio input-text images link-previews? reply] :as subscriptions}]
{:keys [chat-input audio input-text images link-previews? reply edit] :as subscriptions}]
(rn/use-effect
(fn []
(maximized-effect state animations dimensions chat-input)
Expand All @@ -105,7 +104,7 @@
(rn/use-effect
(fn []
(empty-effect animations subscriptions))
[input-text images link-previews? reply])
[input-text images link-previews? reply edit audio])
(rn/use-mount #(reenter-screen-effect state dimensions subscriptions animations)))

(defn use-edit
Expand Down
8 changes: 2 additions & 6 deletions src/status_im/contexts/chat/messenger/composer/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,8 @@
(calc-bottom-content-height images link-previews?))))

(defn empty-input?
[text images link-previews? reply? audio?]
(and (empty? text)
(empty? images)
(not link-previews?)
(not reply?)
(not audio?)))
[{:keys [input-text images link-previews? reply audio edit]}]
(not (or (not-empty input-text) images link-previews? reply audio edit)))
Comment on lines -89 to +90
Copy link
Member

@seanstrom seanstrom Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check if images is not-empty too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is being checked for as images link-previews? reply audio edit is wrapped in a not


(defn blur-input
[input-ref]
Expand Down