File tree 3 files changed +13
-3
lines changed
contexts/profile/contact/actions
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 224
224
(defn open-url [link] (.openURL ^js linking link))
225
225
226
226
(def set-status-bar-style react-native /StatusBar.setBarStyle )
227
+
228
+ (defn sharing
229
+ [content]
230
+ (.share (.-Share ^js react-native) (clj->js content)))
Original file line number Diff line number Diff line change 186
186
:params [public-key]
187
187
:on-success (fn [url]
188
188
(rf/dispatch [:universal-links/save-profile-url public-key url])
189
- (when (fn? on-success) (on-success )))
189
+ (when (fn? on-success) (on-success url )))
190
190
:on-error #(log/error " failed to wakuext_shareUserURLWithData"
191
191
{:error %
192
192
:public-key public-key})}]})))
Original file line number Diff line number Diff line change 29
29
:on-success #(rf/dispatch [:open-modal
30
30
:share-contact ])}]))
31
31
[public-key])
32
- has-nickname? (rn/use-memo (fn [] (not (string/blank? nickname))) [nickname])]
32
+ has-nickname? (rn/use-memo (fn [] (not (string/blank? nickname))) [nickname])
33
+ on-share-profile (rn/use-callback
34
+ (fn []
35
+ (rf/dispatch [:universal-links/generate-profile-url
36
+ {:public-key public-key
37
+ :on-success #(rn/sharing {:message %})}]))
38
+ [public-key])]
33
39
[quo/action-drawer
34
40
[[{:icon :i/edit
35
41
:label (if has-nickname?
43
49
:accessibility-label :show-qr-code }
44
50
{:icon :i/share
45
51
:label (i18n/label :t/share-profile )
46
- :on-press not-implemented/alert
52
+ :on-press on-share-profile
47
53
:accessibility-label :share-profile }
48
54
(when has-nickname?
49
55
{:icon :i/delete
You can’t perform that action at this time.
0 commit comments