parent
e283a72454
commit
7065f4abd2
|
@ -224,3 +224,7 @@
|
|||
(defn open-url [link] (.openURL ^js linking link))
|
||||
|
||||
(def set-status-bar-style react-native/StatusBar.setBarStyle)
|
||||
|
||||
(defn sharing
|
||||
[content]
|
||||
(.share (.-Share ^js react-native) (clj->js content)))
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
:params [public-key]
|
||||
:on-success (fn [url]
|
||||
(rf/dispatch [:universal-links/save-profile-url public-key url])
|
||||
(when (fn? on-success) (on-success)))
|
||||
(when (fn? on-success) (on-success url)))
|
||||
:on-error #(log/error "failed to wakuext_shareUserURLWithData"
|
||||
{:error %
|
||||
:public-key public-key})}]})))
|
||||
|
|
|
@ -29,7 +29,13 @@
|
|||
:on-success #(rf/dispatch [:open-modal
|
||||
:share-contact])}]))
|
||||
[public-key])
|
||||
has-nickname? (rn/use-memo (fn [] (not (string/blank? nickname))) [nickname])]
|
||||
has-nickname? (rn/use-memo (fn [] (not (string/blank? nickname))) [nickname])
|
||||
on-share-profile (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch [:universal-links/generate-profile-url
|
||||
{:public-key public-key
|
||||
:on-success #(rn/sharing {:message %})}]))
|
||||
[public-key])]
|
||||
[quo/action-drawer
|
||||
[[{:icon :i/edit
|
||||
:label (if has-nickname?
|
||||
|
@ -43,7 +49,7 @@
|
|||
:accessibility-label :show-qr-code}
|
||||
{:icon :i/share
|
||||
:label (i18n/label :t/share-profile)
|
||||
:on-press not-implemented/alert
|
||||
:on-press on-share-profile
|
||||
:accessibility-label :share-profile}
|
||||
(when has-nickname?
|
||||
{:icon :i/delete
|
||||
|
|
Loading…
Reference in New Issue