Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e46db6cd2 | ||
|
|
81a2069d6a | ||
|
|
d7cc6aa90a | ||
|
|
73ef9de339 | ||
|
|
66b3510840 | ||
|
|
c34e073bcd |
@@ -227,7 +227,7 @@
|
||||
|
||||
(fx/defn handle-one-to-one-chat-created
|
||||
{:events [::one-to-one-chat-created]}
|
||||
[{:keys [db] :as cofx} chat-id response]
|
||||
[{:keys [db]} chat-id response]
|
||||
(let [chat (chats-store/<-rpc (first (:chats response)))]
|
||||
{:db (assoc-in db [:chats chat-id] chat)
|
||||
:dispatch [:chat.ui/navigate-to-chat chat-id]}))
|
||||
@@ -235,10 +235,8 @@
|
||||
(fx/defn navigate-to-user-pinned-messages
|
||||
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
|
||||
{:events [:chat.ui/navigate-to-pinned-messages]}
|
||||
[{db :db :as cofx} chat-id]
|
||||
(fx/merge cofx
|
||||
{:db (assoc db :current-chat-id chat-id)}
|
||||
(navigation/navigate-to :chat-pinned-messages nil)))
|
||||
[cofx chat-id]
|
||||
(navigation/navigate-to cofx :chat-pinned-messages {:chat-id chat-id}))
|
||||
|
||||
(fx/defn start-chat
|
||||
"Start a chat, making sure it exists"
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
(def ^:const privacy-policy-link "https://status.im/privacy-policy/")
|
||||
(def ^:const terms-of-service-link "https://status.im/terms-of-use")
|
||||
(def ^:const docs-link "https://status.im/docs/")
|
||||
(def ^:const principles-link "https://our.status.im/our-principles/")
|
||||
|
||||
(def ^:const activity-center-notification-type-one-to-one-chat 1)
|
||||
(def ^:const activity-center-notification-type-private-group-chat 2)
|
||||
|
||||
@@ -1753,7 +1753,11 @@
|
||||
:activity.center/notifications-grouped-by-date
|
||||
:<- [:activity.center/notifications]
|
||||
(fn [{:keys [notifications]}]
|
||||
(group-notifications-by-date (map #(assoc % :timestamp (or (:timestamp %) (:timestamp (or (:message %) (:last-message %))))) notifications))))
|
||||
(let [supported-notifications (filter (fn [{:keys [type]}]
|
||||
(or (= constants/activity-center-notification-type-mention type)
|
||||
(= constants/activity-center-notification-type-one-to-one-chat type)
|
||||
(= constants/activity-center-notification-type-private-group-chat type))) notifications)]
|
||||
(group-notifications-by-date (map #(assoc % :timestamp (or (:timestamp %) (:timestamp (or (:message %) (:last-message %))))) supported-notifications)))))
|
||||
|
||||
;;WALLET TRANSACTIONS ==================================================================================================
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[status-im.ui.components.copyable-text :as copyable-text]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.ui.components.webview :refer [webview]]
|
||||
[status-im.constants :refer [privacy-policy-link terms-of-service-link]]
|
||||
[status-im.constants :refer [privacy-policy-link principles-link terms-of-service-link]]
|
||||
[quo.core :as quo]
|
||||
[status-im.ui.components.react :as react])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
@@ -66,3 +66,8 @@
|
||||
[webview
|
||||
{:source {:uri terms-of-service-link}
|
||||
:java-script-enabled true}])
|
||||
|
||||
(views/defview principles []
|
||||
[webview
|
||||
{:source {:uri principles-link}
|
||||
:java-script-enabled true}])
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
[status-im.ui.screens.chat.views :as chat]
|
||||
[status-im.ui.components.list.views :as list]))
|
||||
|
||||
(defn pins-topbar []
|
||||
(let [{:keys [group-chat chat-id chat-name]}
|
||||
@(re-frame/subscribe [:chats/current-chat])
|
||||
(defn pins-topbar [chat]
|
||||
(let [{:keys [group-chat chat-id chat-name]} chat
|
||||
pinned-messages @(re-frame/subscribe [:chats/pinned chat-id])
|
||||
[first-name _] (when-not group-chat @(re-frame.core/subscribe [:contacts/contact-two-names-by-identity chat-id]))]
|
||||
[topbar/topbar {:show-border? true
|
||||
@@ -78,18 +77,20 @@
|
||||
:padding-bottom 16}})])))
|
||||
|
||||
(defn pinned-messages []
|
||||
(let [bottom-space (reagent/atom 0)
|
||||
panel-space (reagent/atom 52)
|
||||
active-panel (reagent/atom nil)
|
||||
position-y (animated/value 0)
|
||||
pan-state (animated/value 0)
|
||||
text-input-ref (quo.react/create-ref)
|
||||
pan-responder (accessory/create-pan-responder position-y pan-state)
|
||||
space-keeper (get-space-keeper-ios bottom-space panel-space active-panel text-input-ref)
|
||||
chat @(re-frame/subscribe [:chats/current-chat-chat-view])]
|
||||
[:<>
|
||||
[pins-topbar]
|
||||
[connectivity/loading-indicator]
|
||||
[pinned-messages-view {:chat chat
|
||||
:pan-responder pan-responder
|
||||
:space-keeper space-keeper}]]))
|
||||
(let [{:keys [chat-id]} @(re-frame/subscribe [:get-screen-params])]
|
||||
(fn []
|
||||
(let [bottom-space (reagent/atom 0)
|
||||
panel-space (reagent/atom 52)
|
||||
active-panel (reagent/atom nil)
|
||||
position-y (animated/value 0)
|
||||
pan-state (animated/value 0)
|
||||
text-input-ref (quo.react/create-ref)
|
||||
pan-responder (accessory/create-pan-responder position-y pan-state)
|
||||
space-keeper (get-space-keeper-ios bottom-space panel-space active-panel text-input-ref)
|
||||
chat @(re-frame/subscribe [:chat-by-id chat-id])]
|
||||
[:<>
|
||||
[pins-topbar chat]
|
||||
[connectivity/loading-indicator]
|
||||
[pinned-messages-view {:chat chat
|
||||
:pan-responder pan-responder
|
||||
:space-keeper space-keeper}]]))))
|
||||
@@ -90,6 +90,7 @@
|
||||
:accessibility-label :profile-nickname-item
|
||||
:accessory :text
|
||||
:accessory-text pin-count
|
||||
:disabled (zero? pin-count)
|
||||
:on-press #(re-frame/dispatch [:contact.ui/pinned-messages-pressed public-key])
|
||||
:chevron true}])
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
;Pinned messages
|
||||
{:name :chat-pinned-messages
|
||||
;TODO custom subtitle
|
||||
;TODO custom subtitle
|
||||
:options {:topBar {:visible false}}
|
||||
:component pin-messages/pinned-messages}
|
||||
|
||||
@@ -455,11 +455,14 @@
|
||||
:options {:topBar {:title {:text (i18n/label :t/about-app)}}}
|
||||
:component about-app/about-app}
|
||||
{:name :privacy-policy
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-policy)}}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/privacy-policy)}}}
|
||||
:component about-app/privacy-policy}
|
||||
{:name :terms-of-service
|
||||
:options {:topBar {:title {:text (i18n/label :t/terms-of-service)}}}
|
||||
:options {:topBar {:title {:text (i18n/label :t/terms-of-service)}}}
|
||||
:component about-app/tos}
|
||||
{:name :principles
|
||||
:options {:topBar {:title {:text (i18n/label :t/principles)}}}
|
||||
:component about-app/principles}
|
||||
{:name :force-accept-tos
|
||||
:options {:topBar {:visible false}}
|
||||
:component terms-of-service/force-accept-tos}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
(defn contact-item [title contact]
|
||||
[copyable-text/copyable-text-view
|
||||
{:copied-text (displayed-name contact)}
|
||||
{:copied-text (:address contact)}
|
||||
[quo/list-item
|
||||
{:title title
|
||||
:title-prefix-width 45
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
(i18n/label :t/wc-new-tos-based-on-principles-prefix)
|
||||
[{:style (merge {:color colors/blue}
|
||||
typography/font-medium)
|
||||
:on-press #(re-frame/dispatch [:open-modal :terms-of-service])}
|
||||
:on-press #(re-frame/dispatch [:open-modal :principles])}
|
||||
" "
|
||||
(i18n/label :t/principles)]])
|
||||
|
||||
|
||||
@@ -1585,17 +1585,17 @@
|
||||
"password-mismatch": "New password and confirmation does not match",
|
||||
"terms-of-service": "Terms of Use",
|
||||
"accept-status-tos-prefix": "I accept Status",
|
||||
"updates-to-tos": "Updates to Terms of Service",
|
||||
"updates-to-tos-desc": "Before you continue, please review the Terms of Service and confirm you take full responsibility for how you use the app.",
|
||||
"updates-to-tos": "Updates to Terms of Use",
|
||||
"updates-to-tos-desc": "Before you continue, please review the Terms of Use and confirm you take full responsibility for how you use the app.",
|
||||
"what-changed": "What changed",
|
||||
"wc-new-tos-based-on-principles-prefix": "New Terms of Service designed based on our",
|
||||
"wc-new-tos-based-on-principles-prefix": "New Terms of Use designed based on our",
|
||||
"principles": "Principles",
|
||||
"wc-how-to-use-status-app": "How to use the Status app including privacy and security",
|
||||
"wc-brand-guide": "Guidance on using branding such as trademarks and logos",
|
||||
"wc-disclaimer": "Disclaimers (including third party providers), warranties, and legal releases",
|
||||
"wc-dispute": "Dispute resolution provisions",
|
||||
"status-is-open-source": "Status is open-source",
|
||||
"build-yourself": "To use the app without these Terms of Service, you can build your own version",
|
||||
"build-yourself": "To use the app without these Terms of Use, you can build your own version",
|
||||
"accept-and-continue": "Accept and continue",
|
||||
"empty-activity-center": "Your chat notifications\nwill appear here",
|
||||
"pinned-messages": "Pinned messages",
|
||||
|
||||
Reference in New Issue
Block a user