File tree 8 files changed +37
-35
lines changed
common/data_confirmation_sheet
settings/privacy_and_security
8 files changed +37
-35
lines changed Original file line number Diff line number Diff line change 4
4
[react-native.core :as rn]
5
5
[status-im.common.data-confirmation-sheet.style :as style]
6
6
[utils.i18n :as i18n]
7
- [utils.navigation :as navigation ]
8
- [utils.re-frame :as rf ]))
7
+ [utils.re-frame :as rf ]
8
+ [utils.user-actions :as user-actions ]))
9
9
10
10
(defn on-choice-callback
11
11
[syncing-on-mobile-network?]
12
12
(rf/dispatch [:network/set-syncing-on-mobile-network syncing-on-mobile-network?])
13
- (navigation /hide-bottom-sheet ))
13
+ (user-actions /hide-bottom-sheet ))
14
14
15
15
(def on-wifi-only (partial on-choice-callback false ))
16
16
(def on-mobile-and-wifi (partial on-choice-callback true ))
19
19
[]
20
20
(let [settings-drawer? (= (rf/sub [:view-id ]) :screen/settings.syncing )
21
21
syncing-on-mobile-network? (rf/sub [:profile/syncing-on-mobile-network? ])]
22
- (rn/use-mount navigation /dismiss-keyboard)
22
+ (rn/use-mount user-actions /dismiss-keyboard)
23
23
[:<>
24
24
[quo/text
25
25
{:weight :semi-bold
Original file line number Diff line number Diff line change 3
3
[quo.core :as quo]
4
4
[react-native.core :as rn]
5
5
[utils.i18n :as i18n]
6
- [utils.navigation :as navigation ]
7
- [utils.re-frame :as rf ]))
6
+ [utils.re-frame :as rf ]
7
+ [utils.user-actions :as user-actions ]))
8
8
9
9
(defn- open-blocked-users
10
10
[]
21
21
[quo/page-nav
22
22
{:background :blur
23
23
:icon-name :i/arrow-left
24
- :on-press navigation /navigate-back}]
24
+ :on-press user-actions /navigate-back}]
25
25
[quo/page-top {:title (i18n/label :t/messages )}]
26
26
[quo/category
27
27
{:label (i18n/label :t/contacts )
Original file line number Diff line number Diff line change 3
3
[quo.core :as quo]
4
4
[status-im.common.data-confirmation-sheet.view :as data-confirmation-sheet]
5
5
[utils.i18n :as i18n]
6
- [utils.navigation :as navigation ]
7
- [utils.re-frame :as rf ]))
6
+ [utils.re-frame :as rf ]
7
+ [utils.user-actions :as user-actions ]))
8
8
9
9
(defn- open-paired-devices-list
10
10
[]
26
26
[quo/page-nav
27
27
{:background :blur
28
28
:icon-name :i/arrow-left
29
- :on-press navigation /navigate-back}]
29
+ :on-press user-actions /navigate-back}]
30
30
[quo/page-top {:title (i18n/label :t/syncing )}]
31
31
[quo/category
32
32
{:data [{:title (i18n/label :t/sync-and-backup )
Original file line number Diff line number Diff line change 9
9
[status-im.contexts.settings.privacy-and-security.style :as style]
10
10
[status-im.feature-flags :as ff]
11
11
[utils.i18n :as i18n]
12
- [utils.navigation :as navigation ]
13
- [utils.re-frame :as rf ]))
12
+ [utils.re-frame :as rf ]
13
+ [utils.user-actions :as user-actions ]))
14
14
15
15
(defn- setting-preview-privacy
16
16
[preview-privacy? customization-color on-change]
68
68
{:key :header
69
69
:background :blur
70
70
:icon-name :i/arrow-left
71
- :on-press navigation /navigate-back}]
71
+ :on-press user-actions /navigate-back}]
72
72
[quo/standard-title
73
73
{:title (i18n/label :t/privacy-and-security )
74
74
:container-style style/title-container
Original file line number Diff line number Diff line change 10
10
[status-im.contexts.wallet.swap.set-spending-cap.style :as style]
11
11
[utils.address :as address-utils]
12
12
[utils.i18n :as i18n]
13
- [utils.navigation :as navigation ]
14
- [utils.re-frame :as rf ]))
13
+ [utils.re-frame :as rf ]
14
+ [utils.user-actions :as user-actions ]))
15
15
16
16
(defn- swap-title
17
17
[{:keys [pay-token-symbol pay-amount account provider]}]
209
209
{:footer-container-padding 0
210
210
:header [quo/page-nav
211
211
{:icon-name :i/close
212
- :on-press navigation /navigate-back
212
+ :on-press user-actions /navigate-back
213
213
:margin-top 8
214
214
:background :blur
215
215
:accessibility-label :top-bar }]
Original file line number Diff line number Diff line change 6
6
[status-im.contexts.wallet.common.utils :as utils]
7
7
[status-im.contexts.wallet.swap.setup-swap.style :as style]
8
8
[utils.i18n :as i18n]
9
- [utils.navigation :as navigation ]
10
- [utils.re-frame :as rf ]))
9
+ [utils.re-frame :as rf ]
10
+ [utils.user-actions :as user-actions ]))
11
11
12
12
(defn- data-item
13
13
[{:keys [title subtitle size subtitle-icon loading?]}]
65
65
(set-pay-value #(subs % 0 (dec (count %)))))]
66
66
[rn/view {:style style/container}
67
67
[account-switcher/view
68
- {:on-press navigation /navigate-back
68
+ {:on-press user-actions /navigate-back
69
69
:icon-name :i/arrow-left
70
70
:margin-top (safe-area/get-top )
71
71
:switcher-type :select-account }]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ (ns utils.user-actions
2
+ " Provides a collection of highly reusable dispatch functions for user actions, including
3
+ navigation and other user-driven events. This namespace focuses on actions that directly
4
+ impact user interaction with the application, ensuring consistency and efficiency in handling
5
+ these interactions."
6
+ (:require [utils.re-frame :as rf]))
7
+
8
+ (defn navigate-back
9
+ []
10
+ (rf/dispatch [:navigate-back ]))
11
+
12
+ (defn hide-bottom-sheet
13
+ []
14
+ (rf/dispatch [:hide-bottom-sheet ]))
15
+
16
+ (defn dismiss-keyboard
17
+ []
18
+ (rf/dispatch [:dismiss-keyboard ]))
You can’t perform that action at this time.
0 commit comments