Skip to content

Commit

Permalink
fix issue 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed May 24, 2024
1 parent ada29f6 commit beee683
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
[react-native.reanimated :as reanimated]
[status-im.contexts.chat.messenger.messages.constants :as messages.constants]))

(def keyboard-avoiding-container
{:flex 1
:z-index 2})
(defn keyboard-avoiding-container
[theme]
{:flex 1
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
:z-index 2})

(defn background-container
[background-color background-opacity top-margin]
Expand Down
6 changes: 4 additions & 2 deletions src/status_im/contexts/chat/messenger/messages/view.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.contexts.chat.messenger.messages.view
(:require
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.platform :as platform]
[react-native.reanimated :as reanimated]
Expand All @@ -15,11 +16,12 @@

(defn- chat-screen
[{:keys [insets] :as props}]
(let [alert-banners-top-margin (rf/sub [:alert-banners/top-margin])
(let [theme (quo.theme/use-theme)
alert-banners-top-margin (rf/sub [:alert-banners/top-margin])
chat-exist? (rf/sub [:chats/current-chat-exist?])]
(when chat-exist?
[rn/keyboard-avoiding-view
{:style style/keyboard-avoiding-container
{:style (style/keyboard-avoiding-container theme)
:keyboard-vertical-offset (- (if platform/ios? alert-banners-top-margin 0) (:bottom insets))}
[list.view/messages-list-content props]
[messages.navigation/view props]
Expand Down
4 changes: 3 additions & 1 deletion src/status_im/contexts/shell/jump_to/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

(defn- navigate-back-handler
[]
(when-not (= 1 (count (navigation.state/get-navigation-state)))
(when (or (seq @navigation.state/modals)
(seq (utils/open-floating-screens))
(> (count (navigation.state/get-navigation-state)) 1))
(rf/dispatch [:navigate-back])
true))

Expand Down

0 comments on commit beee683

Please sign in to comment.