@@ -3,10 +3,9 @@ import { RegistryContext, useAtomValue } from "@effect/atom-react";
33import { useNavigation } from "@react-navigation/native" ;
44import { executeAtomQuery , squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime" ;
55import type { EnvironmentId , PullRequestAction } from "@t3tools/contracts" ;
6- import * as Clipboard from "expo-clipboard" ;
76import { Atom } from "effect/reactivity" ;
87import { use , useCallback , useMemo , useRef , useState } from "react" ;
9- import { Linking , Platform , Share } from "react-native" ;
8+ import { Linking , Platform } from "react-native" ;
109import type { MenuProps } from "../../components/ui/Menu.types" ;
1110import { composerPullRequests } from "../../state/pull-requests" ;
1211import { useAtomCommand } from "../../state/use-atom-command" ;
@@ -16,6 +15,7 @@ import {
1615 PR_ACTION_LABELS ,
1716} from "./pullRequestActions" ;
1817import { scopedPullRequestListKey , type EnvironmentPullRequestListEntry } from "./pullRequestList" ;
18+ import { copyPullRequestLink , sharePullRequestLink } from "./pullRequestLink" ;
1919import { pullRequestTarget } from "./usePullRequestDiff" ;
2020import { useAndroidWorkspaceSelection } from "../workspace/useAndroidWorkspaceSelection" ;
2121
@@ -122,19 +122,15 @@ export function usePullRequestListActions(
122122 return ;
123123 }
124124 if ( action === "copy" ) {
125- void Clipboard . setStringAsync ( entry . url ) ;
125+ copyPullRequestLink ( entry ) ;
126126 return ;
127127 }
128128 if ( action === "provider" ) {
129129 void Linking . openURL ( entry . url ) ;
130130 return ;
131131 }
132132 if ( action === "share" ) {
133- void Share . share (
134- Platform . OS === "ios"
135- ? { url : entry . url , title : entry . title }
136- : { message : entry . url , title : entry . title } ,
137- ) ;
133+ sharePullRequestLink ( entry ) ;
138134 return ;
139135 }
140136 const supported = ( [ "close" , "reopen" , "ready" , "draft" ] as const ) . find (
0 commit comments