Skip to content

Commit

Permalink
tidy: remove redundant event handler for sharing community url
Browse files Browse the repository at this point in the history
  • Loading branch information
seanstrom committed Apr 30, 2024
1 parent 46f3322 commit 51f5f7c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/status_im/contexts/communities/sharing/events.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(ns status-im.contexts.communities.sharing.events
(:require [legacy.status-im.data-store.chats :as data-store.chats]
[react-native.platform :as platform]
[react-native.share :as share]
[taoensso.timbre :as log]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
Expand Down Expand Up @@ -97,20 +96,3 @@
{:error err
:community-id community-id
:event :communities/get-community-share-data}))}]}))

(rf/reg-event-fx :communities/share-community-channel-url-with-data
(fn [_ [chat-id]]
(let [title (i18n/label :t/channel-on-status)
on-success (fn [url]
(share/open
(if platform/ios?
{:activityItemSources [{:placeholderItem {:type "text"
:content title}
:item {:default {:type "url"
:content url}}
:linkMetadata {:title title}}]}
{:title title
:subject title
:url url
:isNewTask true})))]
{:fx [[:dispatch [:communities/get-community-channel-share-data chat-id on-success]]]})))

0 comments on commit 51f5f7c

Please sign in to comment.