diff --git a/src/status_im/subs.cljs b/src/status_im/subs.cljs index 04116a76e52..ce75df69bb2 100644 --- a/src/status_im/subs.cljs +++ b/src/status_im/subs.cljs @@ -37,7 +37,6 @@ [status-im.utils.money :as money] [status-im.utils.platform :as platform] [status-im.utils.security :as security] - [status-im.utils.universal-links.core :as links] [status-im.wallet.db :as wallet.db] [status-im.wallet.utils :as wallet.utils] status-im.ui.screens.keycard.subs @@ -636,9 +635,8 @@ :chats/current-chat :<- [:chats/current-raw-chat] :<- [:multiaccount/public-key] - :<- [:mailserver/ranges] - (fn [[{:keys [group-chat chat-id messages] :as current-chat} - my-public-key ranges]] + (fn [[{:keys [group-chat] :as current-chat} + my-public-key]] (when current-chat (cond-> current-chat (chat.models/public-chat? current-chat) diff --git a/src/status_im/ui/screens/chat/group.cljs b/src/status_im/ui/screens/chat/group.cljs index 237aa5c1e18..c25c3fa70a5 100644 --- a/src/status_im/ui/screens/chat/group.cljs +++ b/src/status_im/ui/screens/chat/group.cljs @@ -81,8 +81,7 @@ {:group-name chat-name})])))) (defn group-chat-description-container - [{:keys [chat-name - public? + [{:keys [public? chat-id loading-messages? no-messages?]}] diff --git a/src/status_im/ui/screens/chat/toolbar_content.cljs b/src/status_im/ui/screens/chat/toolbar_content.cljs index fc8a8577b6f..b16d5812a33 100644 --- a/src/status_im/ui/screens/chat/toolbar_content.cljs +++ b/src/status_im/ui/screens/chat/toolbar_content.cljs @@ -5,17 +5,6 @@ [status-im.ui.screens.chat.styles.main :as st]) (:require-macros [status-im.utils.views :refer [defview letsubs]])) -(defn- in-progress-text [{:keys [highestBlock currentBlock startBlock]}] - (let [total (- highestBlock startBlock) - ready (- currentBlock startBlock) - percentage (if (zero? ready) - 0 - (->> (/ ready total) - (* 100) - (.round js/Math)))] - - (str (i18n/label :t/sync-in-progress) " " percentage "% " currentBlock))) - (defn- group-last-activity [{:keys [contacts public?]}] [react/view {:flex-direction :row} [react/text {:style st/toolbar-subtitle} @@ -51,6 +40,6 @@ chat-name] (when contact [contact-indicator contact]) - (if group-chat + (when group-chat [group-last-activity {:contacts contacts :public? public?}])]])) diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index fcbe147716f..c3d1bbda9ab 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -98,31 +98,28 @@ (defn chat-intro-header-container [{:keys [group-chat - chat-name might-have-join-time-messages? - name pending-invite-inviter-name color chat-id chat-name - public? contact intro-status] :as chat} + name color chat-id chat-name + public? contact]} no-messages] - (let [icon-text (if public? chat-id name) - intro-name (if public? chat-name (multiaccounts/displayed-name contact))] - [react/touchable-without-feedback - {:style {:flex 1 - :align-items :flex-start} - :on-press (fn [_] - (re-frame/dispatch - [:chat.ui/set-chat-ui-props {:input-bottom-sheet nil}]) - (react/dismiss-keyboard!))} - (let [opts - {:chat-id chat-id - :group-chat group-chat - :chat-name chat-name - :public? public? - :color color - :loading-messages? might-have-join-time-messages? - :no-messages? no-messages}] - (if group-chat - [chat-intro opts] - [chat-intro-one-to-one opts]))])) + [react/touchable-without-feedback + {:style {:flex 1 + :align-items :flex-start} + :on-press (fn [_] + (re-frame/dispatch + [:chat.ui/set-chat-ui-props {:input-bottom-sheet nil}]) + (react/dismiss-keyboard!))} + (let [opts + {:chat-id chat-id + :group-chat group-chat + :chat-name chat-name + :public? public? + :color color + :loading-messages? might-have-join-time-messages? + :no-messages? no-messages}] + (if group-chat + [chat-intro opts] + [chat-intro-one-to-one opts]))]) (defonce messages-list-ref (atom nil))