Skip to content

Commit

Permalink
Merge branch 'develop' into jc/clean-wallet-signals
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 authored Feb 3, 2024
2 parents be6576f + 154fbb1 commit b1869ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 23 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/status_im/common/resources.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@
:dark (js/require "../resources/images/ui2/no-permissions-dark.png")}
:sweating-man
{:light (js/require "../resources/images/ui2/sweating-man-light.png")
:dark (js/require "../resources/images/ui2/sweating-man-dark.png")}})
:dark (js/require "../resources/images/ui2/sweating-man-dark.png")}
:no-pinned-messages
{:light (js/require "../resources/images/ui2/no-pinned-messages-light.png")
:dark (js/require "../resources/images/ui2/no-pinned-messages-dark.png")}})

(def mock-images
{:bored-ape (js/require "../resources/images/mock2/bored-ape.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
[quo.theme]
[react-native.core :as rn]
[react-native.fast-image :as fast-image]
[react-native.gesture :as gesture]
[status-im.common.resources :as resources]
[status-im.contexts.chat.messenger.menus.pinned-messages.style :as style]
[status-im.contexts.chat.messenger.messages.content.view :as message]
[utils.i18n :as i18n]
Expand All @@ -24,26 +26,18 @@
[message/message message context (atom false)])

(defn empty-pinned-messages-state
[{:keys [community?]}]
[{:keys [theme community?]}]
[rn/view {:style style/no-pinned-messages-container}
[rn/view {:style style/no-pinned-messages-icon}
[quo/icon :i/placeholder]]
[rn/view {:style style/no-pinned-messages-content}
[quo/text
{:size :paragraph-1
:weight :semi-bold
:style style/no-pinned-messages-title}
(i18n/label :t/no-pinned-messages)]
[quo/text
{:size :paragraph-2
:style style/no-pinned-messages-text}
(i18n/label
(if community?
:t/no-pinned-messages-community-desc
:t/no-pinned-messages-desc))]]])
[quo/empty-state
{:blur? false
:image (resources/get-themed-image :no-pinned-messages theme)
:title (i18n/label :t/no-pinned-messages)
:description (i18n/label (if community?
:t/no-pinned-messages-community-desc
:t/no-pinned-messages-desc))}]])

(defn pinned-messages
[chat-id]
(defn f-pinned-messages
[{:keys [theme chat-id]}]
(let [pinned (rf/sub [:chats/pinned-sorted-list chat-id])
render-data (rf/sub [:chats/current-chat-message-list-view-context :in-pinned-view])
current-chat (rf/sub [:chats/chat-by-id chat-id])
Expand Down Expand Up @@ -83,4 +77,11 @@
:key-fn list-key-fn
:separator [quo/separator {:style {:margin-vertical 8}}]}]
[empty-pinned-messages-state
{:community? (boolean community)}])]))
{:community? (boolean community)
:theme theme}])]))

(defn- internal-pinned-messages
[params]
[:f> f-pinned-messages params])

(def view (quo.theme/with-theme internal-pinned-messages))
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@
(rf/defn show-pins-bottom-sheet
{:events [:pin-message/show-pins-bottom-sheet]}
[cofx chat-id]
(navigation/show-bottom-sheet cofx {:content (fn [] [pinned-messages-menu/pinned-messages chat-id])}))
(navigation/show-bottom-sheet cofx {:content (fn [] [pinned-messages-menu/view {:chat-id chat-id}])}))
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
:button (when empty-input?
{:on-press paste-on-input
:text (i18n/label :t/paste)})
:value @input-value}]
:value (or scanned-address @input-value)}]
[quo/button
{:type :outline
:on-press (fn []
Expand Down
2 changes: 1 addition & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@
"shell-placeholder-title": "Your open tabs will be here",
"shell-placeholder-subtitle": "Jump between your communities, messages,\nwallet accounts and browser tabs",
"no-pinned-messages-desc": "This chat doesn’t have any\npinned messages.",
"no-pinned-messages-community-desc": "This channel doesn’t have any\npinned messages.",
"no-pinned-messages-community-desc": "Just keep pinning, just keep pinning
\nWhat do we do? We pin, pin, pin",
"invite-friends-to-status": "Invite friends to Status",
"share-invite-link": "Share an invite link",
"pending-requests": "Pending requests",
Expand Down

0 comments on commit b1869ac

Please sign in to comment.