Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e for settings sync #13053

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/status_im/multiaccounts/update/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
(assoc-in db [:multiaccount setting] setting-value)
(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
{:events [:multiaccounts.ui/switch-backup-enabled]}
[cofx enabled?]
Expand Down
5 changes: 5 additions & 0 deletions src/status_im/transport/message/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
[status-im.data-store.activities :as data-store.activities]
[status-im.data-store.messages :as data-store.messages]
[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.types :as types]
[status-im.constants :as constants]
Expand Down Expand Up @@ -47,6 +48,7 @@
^js visibility-status-updates (.-statusUpdates response-js)
^js current-visibility-status (.-currentStatus response-js)
^js bookmarks (.-bookmarks response-js)
^js settings (.-settings response-js)
^js cleared-histories (.-clearedHistories response-js)
sync-handler (when-not process-async process-response)]
(cond
Expand Down Expand Up @@ -156,6 +158,9 @@
(models.visibility-status-updates/handle-visibility-status-updates
visibility-status-updates-clj)))

(seq settings)
(update.core/set-many-js cofx settings)

(some? current-visibility-status)
(let [current-visibility-status-clj (types/js->clj current-visibility-status)]
(js-delete response-js "currentStatus")
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.96.4",
"commit-sha1": "f0d3e0419da9357a07b2ed97a2741095798812dd",
"src-sha256": "0bxhh8k504x5yvvvli1hc6ia2qh4acnl77mqigvq35pjk1hr2zkn"
"version": "v0.97.0",
"commit-sha1": "9f7fc78def512929499bc2fa610f3b0e0ea1835b",
"src-sha256": "0glwvx166wkhy57ly1xwdx3657p13ckhq86zkaq0nn00wix35wqm"
}