mirror of
https://github.com/status-im/status-react.git
synced 2025-01-24 09:49:51 +00:00
Handle sync-settings
f0d3e0419d...9f7fc78def
Signed-off-by: Samuel Hawksby-Robinson <samuel@samyoul.com>
This commit is contained in:
parent
070bdc47ba
commit
21b21bb8ff
@ -47,6 +47,16 @@
|
|||||||
(assoc-in db [:multiaccount setting] setting-value)
|
(assoc-in db [:multiaccount setting] setting-value)
|
||||||
(update db :multiaccount dissoc setting))}))
|
(update db :multiaccount dissoc setting))}))
|
||||||
|
|
||||||
|
(fx/defn set-many-js
|
||||||
|
[cofx settings-js]
|
||||||
|
(apply fx/merge
|
||||||
|
cofx
|
||||||
|
(map
|
||||||
|
#(optimistic
|
||||||
|
(keyword (.-name %))
|
||||||
|
(.-value %))
|
||||||
|
settings-js)))
|
||||||
|
|
||||||
(fx/defn toggle-backup-enabled
|
(fx/defn toggle-backup-enabled
|
||||||
{:events [:multiaccounts.ui/switch-backup-enabled]}
|
{:events [:multiaccounts.ui/switch-backup-enabled]}
|
||||||
[cofx enabled?]
|
[cofx enabled?]
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
[status-im.data-store.activities :as data-store.activities]
|
[status-im.data-store.activities :as data-store.activities]
|
||||||
[status-im.data-store.messages :as data-store.messages]
|
[status-im.data-store.messages :as data-store.messages]
|
||||||
[status-im.group-chats.core :as models.group]
|
[status-im.group-chats.core :as models.group]
|
||||||
|
[status-im.multiaccounts.update.core :as update.core]
|
||||||
[status-im.utils.fx :as fx]
|
[status-im.utils.fx :as fx]
|
||||||
[status-im.utils.types :as types]
|
[status-im.utils.types :as types]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
@ -47,6 +48,7 @@
|
|||||||
^js visibility-status-updates (.-statusUpdates response-js)
|
^js visibility-status-updates (.-statusUpdates response-js)
|
||||||
^js current-visibility-status (.-currentStatus response-js)
|
^js current-visibility-status (.-currentStatus response-js)
|
||||||
^js bookmarks (.-bookmarks response-js)
|
^js bookmarks (.-bookmarks response-js)
|
||||||
|
^js settings (.-settings response-js)
|
||||||
^js cleared-histories (.-clearedHistories response-js)
|
^js cleared-histories (.-clearedHistories response-js)
|
||||||
sync-handler (when-not process-async process-response)]
|
sync-handler (when-not process-async process-response)]
|
||||||
(cond
|
(cond
|
||||||
@ -156,6 +158,9 @@
|
|||||||
(models.visibility-status-updates/handle-visibility-status-updates
|
(models.visibility-status-updates/handle-visibility-status-updates
|
||||||
visibility-status-updates-clj)))
|
visibility-status-updates-clj)))
|
||||||
|
|
||||||
|
(seq settings)
|
||||||
|
(update.core/set-many-js cofx settings)
|
||||||
|
|
||||||
(some? current-visibility-status)
|
(some? current-visibility-status)
|
||||||
(let [current-visibility-status-clj (types/js->clj current-visibility-status)]
|
(let [current-visibility-status-clj (types/js->clj current-visibility-status)]
|
||||||
(js-delete response-js "currentStatus")
|
(js-delete response-js "currentStatus")
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.96.4",
|
"version": "v0.97.0",
|
||||||
"commit-sha1": "f0d3e0419da9357a07b2ed97a2741095798812dd",
|
"commit-sha1": "9f7fc78def512929499bc2fa610f3b0e0ea1835b",
|
||||||
"src-sha256": "0bxhh8k504x5yvvvli1hc6ia2qh4acnl77mqigvq35pjk1hr2zkn"
|
"src-sha256": "0glwvx166wkhy57ly1xwdx3657p13ckhq86zkaq0nn00wix35wqm"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user