diff --git a/src/status_im/db.cljs b/src/status_im/db.cljs index b65af572f9..047d3c68f6 100644 --- a/src/status_im/db.cljs +++ b/src/status_im/db.cljs @@ -13,7 +13,7 @@ :sync-state :done :link-previews-whitelist [] :app-state "active" - :wallet wallet.db/default-wallet + :wallet wallet.db/default-wallet :wallet/all-tokens {} :peers-count 0 :node-info {} @@ -34,9 +34,9 @@ :registry {} :visibility-status-updates {} :stickers/packs-pending #{} - :keycard {:nfc-enabled? false - :pin {:original [] - :confirmation [] - :current [] - :puk [] - :enter-step :original}}}) + :keycard {:nfc-enabled? false + :pin {:original [] + :confirmation [] + :current [] + :puk [] + :enter-step :original}}}) diff --git a/src/status_im/ui/components/chat_icon/screen.cljs b/src/status_im/ui/components/chat_icon/screen.cljs index c343cff439..672aed57e3 100644 --- a/src/status_im/ui/components/chat_icon/screen.cljs +++ b/src/status_im/ui/components/chat_icon/screen.cljs @@ -63,25 +63,6 @@ [react/view {:style dot-styles :accessibility-label dot-accessibility-label}])])) -(defn profile-photo-plus-dot-view-old - [{:keys [public-key photo-container photo-path community?]}] - (let [photo-path (if (nil? photo-path) - @(re-frame.core/subscribe [:chats/photo-path public-key]) - photo-path) - photo-container (if (nil? photo-container) - styles/container-chat-list photo-container) - size (:width photo-container) - identicon? (when photo-path (profile.db/base64-png? photo-path)) - dot-styles (visibility-status-utils/icon-visibility-status-dot-old - public-key size identicon?) - dot-accessibility-label (:accessibility-label dot-styles)] - [react/view {:style photo-container - :accessibility-label :profile-photo} - [photos/photo photo-path {:size size}] - (when-not community? - [react/view {:style dot-styles - :accessibility-label dot-accessibility-label}])])) - (defn emoji-chat-icon-view [chat-id group-chat name emoji styles] [react/view (:container styles) @@ -92,16 +73,6 @@ [profile-photo-plus-dot-view {:public-key chat-id :photo-container (:default-chat-icon styles)}])]) -(defn emoji-chat-icon-view-old - [chat-id group-chat name emoji styles] - [react/view (:container styles) - (if group-chat - (if (string/blank? emoji) - [default-chat-icon name styles] - [emoji-chat-icon emoji styles]) - [profile-photo-plus-dot-view-old {:public-key chat-id - :photo-container (:default-chat-icon styles)}])]) - (defn chat-icon-view-toolbar [chat-id group-chat name color emoji] [emoji-chat-icon-view chat-id group-chat name emoji @@ -169,7 +140,7 @@ (if group-chat [default-chat-icon icon-text styles] (let [photo-path @(re-frame.core/subscribe [:chats/photo-path chat-id])] - (if-not (string/blank? photo-path) + (when-not (string/blank? photo-path) [photos/photo photo-path styles])))) (defn emoji-chat-intro-icon-view [icon-text chat-id group-chat emoji styles] @@ -178,7 +149,7 @@ [default-chat-icon icon-text styles] [emoji-chat-icon emoji styles]) (let [photo-path @(re-frame.core/subscribe [:chats/photo-path chat-id])] - (if-not (string/blank? photo-path) + (when-not (string/blank? photo-path) [photos/photo photo-path styles])))) (defn profile-icon-view @@ -192,10 +163,10 @@ (styles/emoji-chat-icon-text size))} override-styles)] [react/view (:container styles) (if (and photo-path (seq photo-path)) - [profile-photo-plus-dot-view-old {:photo-path photo-path - :public-key public-key - :photo-container (:container styles) - :community? community?}] + [profile-photo-plus-dot-view {:photo-path photo-path + :public-key public-key + :photo-container (:container styles) + :community? community?}] (if (string/blank? emoji) [default-chat-icon name styles] [emoji-chat-icon emoji styles])) diff --git a/src/status_im/ui/screens/communities/members.cljs b/src/status_im/ui/screens/communities/members.cljs index d4f2e235f5..faf5b7a587 100644 --- a/src/status_im/ui/screens/communities/members.cljs +++ b/src/status_im/ui/screens/communities/members.cljs @@ -45,15 +45,15 @@ my-public-key can-manage-users? can-kick-users?]}] - (let [member (evt [:bottom-sheet/show-sheet diff --git a/src/status_im/ui/screens/contacts_list/views.cljs b/src/status_im/ui/screens/contacts_list/views.cljs index 1851f4eadc..3b68804f5f 100644 --- a/src/status_im/ui/screens/contacts_list/views.cljs +++ b/src/status_im/ui/screens/contacts_list/views.cljs @@ -15,7 +15,7 @@ [quo/list-item {:title first-name :subtitle second-name - :icon [chat-icon.screen/profile-photo-plus-dot-view-old + :icon [chat-icon.screen/profile-photo-plus-dot-view {:public-key public-key :photo-path (multiaccounts/displayed-photo contact)}] :chevron true diff --git a/src/status_im/ui/screens/home/views/inner_item.cljs b/src/status_im/ui/screens/home/views/inner_item.cljs index fd7fd890b8..77879640a1 100644 --- a/src/status_im/ui/screens/home/views/inner_item.cljs +++ b/src/status_im/ui/screens/home/views/inner_item.cljs @@ -259,7 +259,7 @@ [react/touchable-opacity (merge {:style {:height 64 :background-color background-color}} opts) [:<> [chat-item-icon muted (and group-chat (not public?)) (and group-chat public?)] - [chat-icon.screen/emoji-chat-icon-view-old chat-id group-chat chat-name emoji + [chat-icon.screen/emoji-chat-icon-view chat-id group-chat chat-name emoji {:container (assoc chat-icon.styles/container-chat-list :top 12 :left 16 :position :absolute) :size 40 @@ -279,4 +279,4 @@ (:whisper-timestamp last-message) timestamp))] [unviewed-indicator-old home-item]]) - [message-content-text (select-keys last-message [:content :content-type :community-id]) true]]])) \ No newline at end of file + [message-content-text (select-keys last-message [:content :content-type :community-id]) true]]])) diff --git a/src/status_im/ui/screens/profile/visibility_status/styles.cljs b/src/status_im/ui/screens/profile/visibility_status/styles.cljs index 7beb4b4df1..bda70e7cdf 100644 --- a/src/status_im/ui/screens/profile/visibility_status/styles.cljs +++ b/src/status_im/ui/screens/profile/visibility_status/styles.cljs @@ -14,24 +14,27 @@ :padding 6 :padding-right 12}) -(defn visibility-status-dot [dot-color size] - {:background-color dot-color - :width size - :height size - :border-radius (/ size 2) - :border-width 3.5 - :border-color (quo2.colors/theme-colors quo2.colors/white quo2.colors/neutral-90)}) +(defn visibility-status-dot + [{:keys [color size new-ui?]}] + (if new-ui? + {:background-color color + :width size + :height size + :border-radius (/ size 2) + :border-width 3.5 + :border-color (quo2.colors/theme-colors quo2.colors/white quo2.colors/neutral-90)} + {:background-color color + :width size + :height size + :border-radius (/ size 2) + :border-width 1 + :border-color colors/white})) -(defn visibility-status-dot-old [dot-color size] - {:background-color dot-color - :width size - :height size - :border-radius (/ size 2) - :border-width 1 - :border-color colors/white}) - -(defn visibility-status-profile-dot-old [color size border-width margin-left] - (merge (visibility-status-dot-old color size) +(defn visibility-status-profile-dot + [{:keys [color size border-width margin-left new-ui?]}] + (merge (visibility-status-dot {:color color + :size size + :new-ui? new-ui?}) {:margin-right 6 :margin-left margin-left :border-width border-width})) diff --git a/src/status_im/ui/screens/profile/visibility_status/utils.cljs b/src/status_im/ui/screens/profile/visibility_status/utils.cljs index d09df01ce7..c11d2e5117 100644 --- a/src/status_im/ui/screens/profile/visibility_status/utils.cljs +++ b/src/status_im/ui/screens/profile/visibility_status/utils.cljs @@ -1,12 +1,13 @@ (ns status-im.ui.screens.profile.visibility-status.utils - (:require [status-im.constants :as constants] + (:require [clojure.string :as string] + [quo.design-system.colors :as colors] + [quo2.foundations.colors :as quo2.colors] + [status-im.constants :as constants] [status-im.i18n.i18n :as i18n] [status-im.ui.screens.profile.visibility-status.styles :as styles] - [status-im.utils.handlers :refer [ (when automatic? - [rn/view {:style (styles/visibility-status-profile-dot-old - colors/color-inactive size border-width 6)}]) - [rn/view {:style (styles/visibility-status-profile-dot-old - color size border-width margin-left)}]])) + [rn/view {:style (styles/visibility-status-profile-dot + {:color colors/color-inactive + :size size + :border-width border-width + :margin-left 6 + :new-ui? new-ui?})}]) + [rn/view {:style (styles/visibility-status-profile-dot + {:color color + :size size + :border-width border-width + :margin-left margin-left + :new-ui? new-ui?})}]])) (defn visibility-status-button [on-press props] (let [logged-in? (