Skip to content

Commit e42087a

Browse files
authored
Chore: Add :screen qualifier to all screens (#22413)
1 parent 7bd1270 commit e42087a

File tree

82 files changed

+444
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+444
-523
lines changed

doc/new-guidelines.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -550,14 +550,14 @@ used in the new code in `src/status_im2/`. Don't use
550550
(rf/merge cofx
551551
(reset-community-id-input id)
552552
(bottom-sheet/hide-bottom-sheet)
553-
(navigation/open-modal :invite-people-community {:invite? true})))
553+
(navigation/open-modal :screen/invite-people-community {:invite? true})))
554554

555555
;; good
556556
(re-frame/reg-event-fx :communities/invite-people-pressed
557557
(fn [{:keys [db]} [id]]
558558
{:db (assoc db :communities/community-id-input id)
559559
:fx [[:dispatch [:hide-bottom-sheet]]
560-
[:dispatch [:open-modal :invite-people-community {:invite? true}]]]}))
560+
[:dispatch [:open-modal :screen/invite-people-community {:invite? true}]]]}))
561561
```
562562

563563
### Registering top-level re-frame subscriptions

src/legacy/status_im/browser/core.cljs

+4-4
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@
306306
:browser/options
307307
{:browser-id (:browser-id browser)}
308308
:browser/screen-id :browser)
309-
:dispatch-n [[:shell/change-tab :browser-stack]]}
310-
(navigation/pop-to-root :shell-stack)
309+
:dispatch-n [[:shell/change-tab :screen/browser-stack]]}
310+
(navigation/pop-to-root :screen/shell-stack)
311311
(chat.events/close-chat (:current-chat-id db))
312312
(update-browser browser)
313313
(resolve-url nil))
@@ -323,7 +323,7 @@
323323
:browser/options
324324
{:browser-id browser-id}
325325
:browser/screen-id :browser)
326-
:dispatch-n [[:shell/change-tab :browser-stack]]}
326+
:dispatch-n [[:shell/change-tab :screen/browser-stack]]}
327327
(update-browser browser)
328328
(resolve-url nil))))
329329

@@ -332,7 +332,7 @@
332332
[{:keys [db] :as cofx}]
333333
(rf/merge cofx
334334
{:db (assoc db :browser/screen-id :browser-tabs)
335-
:dispatch-n [[:shell/change-tab :browser-stack]]}))
335+
:dispatch-n [[:shell/change-tab :screen/browser-stack]]}))
336336

337337
(rf/defn web3-error-callback
338338
{:events [:browser.dapp/transaction-on-error]}

src/legacy/status_im/events.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
[{:keys [db] :as cofx} view-id]
169169
(rf/merge cofx
170170
(cond
171-
(= :chat view-id)
171+
(= :screen/chat view-id)
172172
{:effects.async-storage/set {:chat-id (get-in cofx [:db :current-chat-id])
173173
:key-uid (get-in cofx [:db :profile/profile :key-uid])}
174174
:db (assoc db :screens/was-focused-once? true)

src/legacy/status_im/group_chats/core.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
(fn [{:keys [db]} [response]]
2424
{:db (dissoc db :current-chat-id)
2525
:fx [[:dispatch [:sanitize-messages-and-process-response response]]
26-
[:dispatch [:pop-to-root :shell-stack]]
26+
[:dispatch [:pop-to-root :screen/shell-stack]]
2727
[:activity-center.notifications/fetch-unread-count]]}))
2828

2929
(rf/defn handle-chat-update
@@ -116,7 +116,7 @@
116116
[cofx chat-id]
117117
(rf/merge cofx
118118
(chat.events/deactivate-chat chat-id)
119-
(navigation/pop-to-root :shell-stack)))
119+
(navigation/pop-to-root :screen/shell-stack)))
120120

121121
(def not-blank?
122122
(complement string/blank?))

src/legacy/status_im/pairing/core.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
[{:keys [db] :as cofx}]
7575
(rf/merge cofx
7676
{:db (assoc-in db [:pairing/prompt-user-pop-up] false)}
77-
(navigation/navigate-to :installations nil)))
77+
(navigation/navigate-to :screen/installations nil)))
7878

7979
(rf/defn prompt-user-on-new-installation
8080
[{:keys [db]}]

src/legacy/status_im/qr_scanner/core.cljs

+9-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[_ opts]
1515
{:request-permissions-fx
1616
{:permissions [:camera]
17-
:on-allowed #(re-frame/dispatch [:open-modal :qr-scanner opts])
17+
:on-allowed #(re-frame/dispatch [:open-modal :screen/qr-scanner opts])
1818
:on-denied (fn []
1919
(utils/set-timeout
2020
#(utils/show-popup (i18n/label :t/error)
@@ -62,8 +62,8 @@
6262
(cond
6363
(and public-key own)
6464
(rf/merge cofx
65-
(navigation/pop-to-root :shell-stack)
66-
(navigation/navigate-to :my-profile nil))
65+
(navigation/pop-to-root :screen/shell-stack)
66+
(navigation/navigate-to :screen/my-profile nil))
6767

6868
(and public-key (not own))
6969
(rf/merge cofx
@@ -73,14 +73,15 @@
7373
:else
7474
{:effects.utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
7575
:content (i18n/label :t/ens-name-not-found)
76-
:on-dismiss #(re-frame/dispatch [:pop-to-root :shell-stack])}})))
76+
:on-dismiss #(re-frame/dispatch [:pop-to-root
77+
:screen/shell-stack])}})))
7778

7879
(rf/defn handle-eip681
7980
[cofx data]
8081
(rf/merge cofx
81-
{:dispatch-n [[:shell/change-tab :wallet-stack]
82+
{:dispatch-n [[:shell/change-tab :screen/wallet-stack]
8283
[:wallet-legacy/parse-eip681-uri-and-resolve-ens data]]}
83-
(navigation/pop-to-root :shell-stack)))
84+
(navigation/pop-to-root :screen/shell-stack)))
8485

8586
(rf/defn handle-local-pairing
8687
{:events [::handle-local-pairing-uri]}
@@ -103,7 +104,8 @@
103104
:event ::match-scanned-value})
104105
{:dispatch [:navigate-back]
105106
:effects.utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
106-
:on-dismiss #(re-frame/dispatch [:pop-to-root :shell-stack])}})))
107+
:on-dismiss #(re-frame/dispatch [:pop-to-root
108+
:screen/shell-stack])}})))
107109

108110
(rf/defn on-scan
109111
{:events [::on-scan-success]}

src/legacy/status_im/ui/screens/advanced_settings/views.cljs

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
:title (i18n/label :t/log-level)
4242
:accessibility-label :log-level-settings-button
4343
:on-press
44-
#(re-frame/dispatch [:open-modal :legacy-:og-level-settings])
44+
#(re-frame/dispatch [:open-modal :screen/legacy-log-level-settings])
4545
:accessory :text
4646
:accessory-text current-log-level
4747
:chevron true}
4848
{:size :small
4949
:title (i18n/label :t/fleet)
5050
:accessibility-label :fleet-settings-button
5151
:on-press
52-
#(re-frame/dispatch [:open-modal :fleet-settings])
52+
#(re-frame/dispatch [:open-modal :screen/fleet-settings])
5353
:accessory :text
5454
:accessory-text current-fleet
5555
:chevron true}
@@ -64,14 +64,14 @@
6464
:accessibility-label :rpc-usage-info
6565
:container-margin-top 8
6666
:on-press
67-
#(re-frame/dispatch [:open-modal :rpc-usage-info])
67+
#(re-frame/dispatch [:open-modal :screen/rpc-usage-info])
6868
:chevron true}
6969
{:size :small
7070
:title (i18n/label :t/peers-stats)
7171
:accessibility-label :peers-stats
7272
:container-margin-top 8
7373
:on-press
74-
#(re-frame/dispatch [:open-modal :peers-stats])
74+
#(re-frame/dispatch [:open-modal :screen/peers-stats])
7575
:chevron true}
7676
{:size :small
7777
:title (i18n/label :t/light-client-enabled)

src/legacy/status_im/ui/screens/browser/views.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
(if empty-tab
105105
[react/touchable-highlight
106106
{:accessibility-label :universal-qr-scanner
107-
:on-press #(re-frame/dispatch [:open-modal :shell-qr-reader])}
107+
:on-press #(re-frame/dispatch [:open-modal :screen/shell-qr-reader])}
108108
[icons/icon :main-icons/qr {:color colors/black}]]
109109
[react/touchable-highlight
110110
{:on-press #(re-frame/dispatch

src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
[rn/view (style/community-view-button)
181181
[rn/touchable-opacity
182182
{:on-press #(do
183-
(rf/dispatch [:pop-to-root :shell-stack])
183+
(rf/dispatch [:pop-to-root :screen/shell-stack])
184184
(rf/dispatch [:communities/navigate-to-community-overview (:id community)])
185185
(rf/dispatch [:chat/close]))}
186186
[rn/text

src/legacy/status_im/ui/screens/communities/members.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
[react/view {:flex-direction :row}
105105
(when (pos? requests-count)
106106
[unviewed-indicator/unviewed-indicator requests-count])]
107-
:on-press #(rf/dispatch [:navigate-to :community-requests-to-join {:community-id community-id}])
107+
:on-press #(rf/dispatch [:navigate-to :screen/community-requests-to-join
108+
{:community-id community-id}])
108109
:title (i18n/label :t/membership-requests)}]
109110
[quo/separator {:style {:margin-vertical 8}}]]))
110111

src/legacy/status_im/ui/screens/glossary/view.cljs

-74
This file was deleted.

src/legacy/status_im/ui/screens/help_center/views.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[{:size :small
1313
:title (i18n/label :t/submit-bug)
1414
:accessibility-label :submit-bug-button
15-
:on-press #(re-frame/dispatch [:open-modal :bug-report])
15+
:on-press #(re-frame/dispatch [:open-modal :screen/bug-report])
1616
:chevron true}
1717
{:size :small
1818
:title (i18n/label :t/status-help)

src/legacy/status_im/ui/screens/profile/user/views.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:title (i18n/label :t/sync-settings)
1919
:accessibility-label :sync-settings-button
2020
:chevron true
21-
:on-press #(re-frame/dispatch [:open-modal :legacy-sync-settings])}]])
21+
:on-press #(re-frame/dispatch [:open-modal :screen/legacy-sync-settings])}]])
2222

2323
(defn legacy-settings
2424
[]

0 commit comments

Comments
 (0)