Skip to content

Commit

Permalink
fix bottom message hidden behind composer with minimised keyboard whe…
Browse files Browse the repository at this point in the history
…n replying to message
  • Loading branch information
Parveshdhull committed Jun 6, 2024
1 parent 0d6bd9c commit 8950ecc
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions src/status_im/contexts/chat/messenger/messages/list/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,37 @@
;; https://github.com/status-im/status-mobile/issues/17426
[quo/skeleton-list (skeleton-list-props :messages parent-height platform/ios?)]]))

(defn header-height
[insets able-to-send-message?]
(let [images (rf/sub [:chats/sending-image])
reply (rf/sub [:chats/reply-message])
edit (rf/sub [:chats/edit-message])
link-previews? (or (rf/sub [:chats/link-previews?])
(rf/sub [:chats/status-link-previews?]))]
(if able-to-send-message?
(cond-> composer.constants/composer-default-height
(ff/enabled? ::ff/shell.jump-to)
(+ jump-to.constants/floating-shell-button-height)

(seq images)
(+ composer.constants/images-container-height)

reply
(+ composer.constants/reply-container-height)

edit
(+ composer.constants/edit-container-height)

link-previews?
(+ composer.constants/links-container-height)

true
(+ (:bottom insets)))
(- 70 (:bottom insets)))))

(defn list-header
[insets able-to-send-message?]
(let [images (rf/sub [:chats/sending-image])
height (if able-to-send-message?
(+ composer.constants/composer-default-height
(if (ff/enabled? ::ff/shell.jump-to)
jump-to.constants/floating-shell-button-height
0)
(if (seq images) composer.constants/images-container-height 0)
(:bottom insets))
(- 70 (:bottom insets)))]
[rn/view {:style {:height height}}]))
[rn/view {:style {:height (header-height insets able-to-send-message?)}}])

(defn list-footer-avatar
[{:keys [distance-from-list-top display-name online? profile-picture theme group-chat color
Expand Down

0 comments on commit 8950ecc

Please sign in to comment.