Use status-go settings for contact requests
09ba88c1...cc80f575
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
cbba1372b3
commit
707cf82b8b
|
@ -4,8 +4,8 @@
|
|||
[status-im.data-store.contacts :as contacts-store]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.navigation :as navigation]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.async-storage.core :as async-storage]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contact.block :as contact.block]))
|
||||
|
@ -144,6 +144,9 @@
|
|||
|
||||
(fx/defn switch-mutual-contact-requests-enabled
|
||||
{:events [:multiaccounts.ui/switch-mutual-contact-requests-enabled]}
|
||||
[{:keys [db]} enabled?]
|
||||
{::async-storage/set! {:mutual-contact-requests-enabled? enabled?}
|
||||
:db (assoc db :mutual-contact-requests/enabled? enabled?)})
|
||||
[cofx enabled?]
|
||||
(multiaccounts.update/multiaccount-update
|
||||
cofx
|
||||
:mutual-contact-enabled?
|
||||
enabled?
|
||||
nil))
|
||||
|
|
|
@ -94,13 +94,6 @@
|
|||
:wallet-connect-enabled?
|
||||
#(re-frame/dispatch [:multiaccounts.ui/switch-wallet-connect-enabled %]))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::initialize-mutual-contact-requests
|
||||
(fn []
|
||||
(async-storage/get-item
|
||||
:mutual-contact-requests-enabled?
|
||||
#(re-frame/dispatch [:multiaccounts.ui/switch-mutual-contact-requests-enabled %]))))
|
||||
|
||||
(defn rpc->accounts [accounts]
|
||||
(reduce (fn [acc {:keys [chat type wallet] :as account}]
|
||||
(if chat
|
||||
|
@ -366,10 +359,6 @@
|
|||
[cofx]
|
||||
{::initialize-wallet-connect nil})
|
||||
|
||||
(fx/defn initialize-mutual-contact-requests
|
||||
[cofx]
|
||||
{::initialize-mutual-contact-requests nil})
|
||||
|
||||
(fx/defn get-node-config-callback
|
||||
{:events [::get-node-config-callback]}
|
||||
[{:keys [db] :as cofx} node-config-json]
|
||||
|
@ -404,7 +393,6 @@
|
|||
(initialize-appearance)
|
||||
(initialize-communities-enabled)
|
||||
(initialize-wallet-connect)
|
||||
(initialize-mutual-contact-requests)
|
||||
(get-node-config)
|
||||
(communities/fetch)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
|
|
|
@ -267,10 +267,10 @@
|
|||
(reg-root-key-sub :wallet-connect/session-managed :wallet-connect/session-managed)
|
||||
(reg-root-key-sub :contact-requests/pending :contact-requests/pending)
|
||||
|
||||
(reg-root-key-sub :mutual-contact-requests/enabled? :mutual-contact-requests/enabled?)
|
||||
|
||||
; Testing
|
||||
|
||||
|
||||
(reg-root-key-sub :messenger/started? :messenger/started?)
|
||||
|
||||
(re-frame/reg-sub
|
||||
|
@ -2256,6 +2256,12 @@
|
|||
(fn [multiaccount]
|
||||
(get multiaccount :profile-pictures-show-to)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:mutual-contact-requests/enabled?
|
||||
:<- [:multiaccount]
|
||||
(fn [settings]
|
||||
(boolean (:mutual-contact-enabled? settings))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::profile-pictures-visibility
|
||||
:<- [:multiaccount]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.101.0",
|
||||
"commit-sha1": "09ba88c19dc36c88d22e880d6568e4fe4861ddc3",
|
||||
"src-sha256": "178p268kj5n0qzsw8i20zgip34q1rrxa7l7j3gib6ai3a30p6zif"
|
||||
"version": "v0.101.1",
|
||||
"commit-sha1": "cc80f5753baf4701cfabcde8d01c2e8b9deebd6f",
|
||||
"src-sha256": "1sc4a8qnmb64dn0x9s4r1m42dwzr70jh2mzgyhn2mavx33abr8kn"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue