Skip to content

Commit 1b948cb

Browse files
committed
dark mode
1 parent 7f87892 commit 1b948cb

File tree

29 files changed

+184
-155
lines changed

29 files changed

+184
-155
lines changed

ios/StatusIm/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<string>UIInterfaceOrientationLandscapeRight</string>
127127
</array>
128128
<key>UIViewControllerBasedStatusBarAppearance</key>
129-
<false/>
129+
<true/>
130130
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
131131
<array>
132132
<string>A00000080400010101</string>

src/status_im/acquisition/chat.cljs

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
[cofx referrer chat-name]
3434
(fx/merge cofx
3535
{::persistence/chat-initalized! true}
36-
(navigation/navigate-to :chat nil)
37-
#_(navigation/navigate-to :tabs {:screen :chat-stack
38-
:params {:screen :referral-enclav}})))
36+
(navigation/navigate-to-cofx :chat nil)))
3937

4038
(fx/defn join-public-chat
4139
[cofx chat-name]

src/status_im/browser/core.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
(fx/merge cofx
322322
{:db (assoc db :browser/options
323323
{:browser-id (:browser-id browser)})}
324-
;;TODO change tab to browser
324+
(navigation/change-tab :browser)
325325
(navigation/set-root :browser)
326326
(update-browser browser)
327327
(resolve-url nil)))))

src/status_im/chat/models.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
[{:keys [db] :as cofx} identity]
343343
(let [my-public-key (get-in db [:multiaccount :public-key])]
344344
(if (= my-public-key identity)
345-
(navigation/navigate-to-cofx cofx :profile-stack {:screen :my-profile})
345+
(navigation/navigate-to-cofx cofx :my-profile)
346346
(fx/merge
347347
cofx
348348
{:db (assoc db :contacts/identity identity)}

src/status_im/contact/chat.cljs

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
{:events [:contact.ui/send-message-pressed]
1010
:interceptors [(re-frame/inject-cofx :random-id-generator)]}
1111
[cofx {:keys [public-key]}]
12-
(chat/start-chat cofx public-key))
12+
(fx/merge cofx
13+
(navigation/pop-to-root-tab :home-root)
14+
(chat/start-chat public-key)))
1315

1416
(fx/defn contact-code-submitted
1517
{:events [:contact.ui/contact-code-submitted]

src/status_im/ens/core.cljs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
[cofx]
3535
;; we reset navigation so that navigate back doesn't return
3636
;; into the registration flow
37+
;;TODO set root
3738
(navigation/navigate-reset cofx
3839
{:index 1
3940
:key :profile-stack

src/status_im/keycard/backup_key.cljs

+3-6
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
(fx/merge cofx
1818
{:db (-> db
1919
(assoc-in [:keycard :creating-backup?] backup-type))}
20-
(if (multiaccounts.model/logged-in? cofx)
21-
(navigation/navigate-to-cofx :seed-phrase nil)
22-
(navigation/navigate-to-cofx :key-storage-stack {:screen :seed-phrase}))))
20+
(navigation/navigate-to-cofx :seed-phrase nil)))
2321

2422
(fx/defn recovery-card-pressed
2523
{:events [:keycard-settings.ui/recovery-card-pressed]}
@@ -49,6 +47,7 @@
4947
mnemonic/sanitize-passphrase)
5048
:password nil
5149
:success-event ::create-backup-card}})
50+
5251
(fx/defn create-backup-card
5352
{:events [::create-backup-card]}
5453
[{:keys [db] :as cofx} root-data derived-data]
@@ -63,6 +62,4 @@
6362
(assoc-in [:keycard :flow] :recovery)
6463
(update :multiaccounts/key-storage dissoc :seed-phrase))
6564
:dismiss-keyboard nil}
66-
(if (multiaccounts.model/logged-in? cofx)
67-
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)
68-
(navigation/navigate-to-cofx :intro-stack {:screen :keycard-onboarding-intro}))))
65+
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))

src/status_im/keycard/login.cljs

+1-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@
7171
:error nil
7272
:status nil))})
7373
(when-not (:multiaccounts/login db)
74-
(navigation/navigate-to-cofx
75-
:profile-stack
76-
{:screen :keycard-pin}))))
74+
(navigation/navigate-to-cofx :keycard-pin nil))))
7775

7876
(fx/defn dismiss-frozen-keycard-popover
7977
{:events [::frozen-keycard-popover-dismissed]}

src/status_im/mailserver/core.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
:on-accept #(do
316316
(reset! showing-connection-error-popup? false)
317317
(re-frame/dispatch [:mailserver.ui/dismiss-connection-error true])
318-
(re-frame/dispatch [:navigate-to :profile-stack {:screen :offline-messaging-settings}]))
318+
(re-frame/dispatch [:navigate-to :offline-messaging-settings]))
319319
:extra-options [{:text (i18n/label :t/mailserver-retry)
320320
:onPress #(do
321321
(reset! showing-connection-error-popup? false)

src/status_im/mobile_sync_settings/core.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@
109109
(fx/merge
110110
cofx
111111
(bottom-sheet/hide-bottom-sheet)
112-
(navigation/navigate-to-cofx :profile-stack {:screen :mobile-network-settings
113-
:initial false})))
112+
(navigation/navigate-to-cofx :mobile-network-settings nil)))
114113

115114
(fx/defn mobile-network-show-offline-sheet
116115
{:events [:mobile-network/show-offline-sheet]}

src/status_im/multiaccounts/key_storage/core.cljs

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
[cofx]
2020
(navigation/navigate-to-cofx
2121
cofx
22-
:key-storage-stack
23-
{:screen (if (multiaccounts.model/logged-in? cofx)
24-
:actions-logged-in
25-
:actions-not-logged-in)}))
22+
(if (multiaccounts.model/logged-in? cofx)
23+
:actions-logged-in
24+
:actions-not-logged-in)
25+
nil))
2626

2727
(fx/defn move-keystore-checked
2828
{:events [::move-keystore-checked]}
@@ -46,7 +46,7 @@
4646
(fx/merge
4747
cofx
4848
{:db (assoc db :recovered-account? true)}
49-
(navigation/navigate-to-cofx :key-storage-stack {:screen :seed-phrase})))
49+
(navigation/navigate-to-cofx :seed-phrase nil)))
5050

5151
(fx/defn seed-phrase-input-changed
5252
{:events [::seed-phrase-input-changed]}
@@ -180,7 +180,7 @@ We don't need to take the exact steps, just set the required state and redirect
180180
(assoc-in [:keycard :from-key-storage-and-migration?] true)
181181
(dissoc :multiaccounts/key-storage))}
182182
(popover/hide-popover)
183-
(navigation/navigate-to-cofx :intro-stack {:screen :keycard-onboarding-intro})))
183+
(navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
184184

185185
(fx/defn handle-delete-multiaccount-error
186186
{:events [::delete-multiaccount-error]}
@@ -192,7 +192,7 @@ We don't need to take the exact steps, just set the required state and redirect
192192
[cofx _]
193193
(fx/merge cofx
194194
(popover/hide-popover)
195-
(navigation/navigate-to-cofx :intro-stack {:screen :multiaccounts})))
195+
(navigation/navigate-to-cofx :multiaccounts nil)))
196196

197197
(comment
198198
;; check import mnemonic output

src/status_im/multiaccounts/key_storage/core_test.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858
(is (= :passed-derived-data (get-in res [:db :intro-wizard :derived])))
5959
(is (= :advanced (get-in res [:db :intro-wizard :selected-storage-type]))) ; :advanced storage type means Keycard
6060
(is (= :recovery (get-in res [:db :keycard :flow])))
61-
(is (get-in res [:db :keycard :from-key-storage-and-migration?]))
62-
(is (= {:intro-stack {:screen :keycard-onboarding-intro}} (get-in res [:db :navigation/screen-params]))))))
61+
(is (get-in res [:db :keycard :from-key-storage-and-migration?])))))
6362

6463
(comment
6564
(security/safe-unmask-data (security/mask-data nil)))

src/status_im/multiaccounts/login/core.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@
308308
"new-auth-method" new-auth-method)
309309
(fx/merge cofx
310310
{:db (assoc db :chats/loading? true)
311-
:init-tabs-fx nil
312311
::json-rpc/call
313312
[{:method "browsers_getBrowsers"
314313
:on-success #(re-frame/dispatch [::initialize-browsers %])}
@@ -317,7 +316,8 @@
317316
{:method "permissions_getDappPermissions"
318317
:on-success #(re-frame/dispatch [::initialize-dapp-permissions %])}
319318
{:method "settings_getSettings"
320-
:on-success #(re-frame/dispatch [::get-settings-callback %])}]}
319+
:on-success #(do (re-frame/dispatch [::get-settings-callback %])
320+
(re-frame/dispatch [:init-tabs]))}]}
321321
(notifications/load-notification-preferences)
322322
(when save-password?
323323
(keychain/save-user-password key-uid password))

src/status_im/navigation.cljs

+30-36
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,40 @@
44
[taoensso.timbre :as log]
55
[status-im.utils.fx :as fx]
66
[status-im.anon-metrics.core :as anon-metrics]))
7-
8-
(re-frame/reg-fx
9-
::navigate-to
10-
(fn [[view-id params]]
11-
(log/debug :navigate-to view-id params)
12-
(navigation/navigate-to (name view-id) params)))
13-
14-
(re-frame/reg-fx
15-
::navigate-back
16-
(fn []
17-
(log/debug :navigate-back)
18-
(navigation/navigate-back)))
19-
7+
;;TODO
208
(re-frame/reg-fx
219
::navigate-reset
2210
(fn [config]
2311
(log/debug :navigate-reset config)
2412
(navigation/navigate-reset config)))
2513

26-
(re-frame/reg-fx
27-
::navigate-replace
28-
(fn [[view-id params]]
29-
(log/debug :navigate-replace view-id params)
30-
(navigation/navigate-replace (name view-id) params)))
14+
;;TODO
15+
(fx/defn navigate-reset
16+
{:events [:navigate-reset]}
17+
[_ config]
18+
{::navigate-reset config})
19+
3120

3221
(defn- all-screens-params [db view screen-params]
3322
(cond-> db
34-
(and (seq screen-params) (:screen screen-params) (:params screen-params))
35-
(all-screens-params (:screen screen-params) (:params screen-params))
23+
(and (seq screen-params) (:screen screen-params) (:params screen-params))
24+
(all-screens-params (:screen screen-params) (:params screen-params))
3625

37-
(seq screen-params)
38-
(assoc-in [:navigation/screen-params view] screen-params)))
26+
(seq screen-params)
27+
(assoc-in [:navigation/screen-params view] screen-params)))
3928

4029
(fx/defn navigate-to-cofx
4130
[{:keys [db] :as cofx} go-to-view-id screen-params]
4231
{:db
43-
(-> (assoc db :view-id go-to-view-id)
44-
(all-screens-params go-to-view-id screen-params))
32+
(-> (assoc db :view-id go-to-view-id)
33+
(all-screens-params go-to-view-id screen-params))
4534
;::navigate-to [go-to-view-id screen-params]
46-
:rnn-navigate-to-fx go-to-view-id
35+
:rnn-navigate-to-fx go-to-view-id
4736
;; simulate a navigate-to event so it can be captured be anon-metrics
4837
::anon-metrics/transform-and-log {:coeffects {:event [:navigate-to go-to-view-id screen-params]}}})
4938

5039
(fx/defn navigate-to
51-
{:events [:navigate-to]}
40+
{:events [:navigate-to]}
5241
[cofx go-to-view-id screen-params]
5342
(navigate-to-cofx cofx go-to-view-id screen-params))
5443

@@ -57,29 +46,34 @@
5746
[_]
5847
{:rnn-navigate-back-fx nil})
5948

49+
(fx/defn pop-to-root-tab
50+
{:events [:pop-to-root-tab]}
51+
[_ tab]
52+
{:rnn-pop-to-root-tab-fx tab})
53+
6054
(fx/defn set-root
6155
{:events [:navigate-set-root]}
6256
[_ root]
6357
{:rnn-set-root-fx root})
6458

65-
(fx/defn navigate-reset
66-
{:events [:navigate-reset]}
67-
[_ config]
68-
{::navigate-reset config})
59+
(fx/defn change-tab
60+
{:events [:navigate-change-tab]}
61+
[_ tab]
62+
{:rnn-change-tab-fx tab})
6963

7064
(fx/defn navigate-replace
71-
{:events [:navigate-replace]
65+
{:events [:navigate-replace]
7266
:interceptors [anon-metrics/interceptor]}
7367
[{:keys [db]} go-to-view-id screen-params]
7468
(let [db (cond-> (assoc db :view-id go-to-view-id)
75-
(seq screen-params)
76-
(assoc-in [:navigation/screen-params go-to-view-id] screen-params))]
77-
{:db db
78-
::navigate-replace [go-to-view-id screen-params]}))
69+
(seq screen-params)
70+
(assoc-in [:navigation/screen-params go-to-view-id] screen-params))]
71+
{:db db
72+
:navigate-replace-fx [go-to-view-id screen-params]}))
7973

8074
(fx/defn open-modal
8175
{:events [:open-modal]}
82-
[{:keys [db] :as cofx} comp screen-params]
76+
[{:keys [db]} comp screen-params]
8377
{:db
8478
(-> (assoc db :view-id comp)
8579
(all-screens-params comp screen-params))

0 commit comments

Comments
 (0)