using in app browser for post and comment linkt

This commit is contained in:
Nouman Tahir 2022-11-10 14:02:30 +05:00
parent 0192ee4afd
commit 9a989df6f3
3 changed files with 13 additions and 25 deletions

View File

@ -98,18 +98,12 @@ const CommentBody = ({
if (ind === 1) {
// open link
if (selectedLink) {
Linking.canOpenURL(selectedLink).then((supported) => {
if (supported) {
Linking.openURL(selectedLink);
} else {
dispatch(
toastNotification(
intl.formatMessage({
id: 'alert.failed_to_open',
}),
),
);
}
RootNavigation.navigate({
name: ROUTES.SCREENS.WEB_BROWSER,
params: {
url:selectedLink,
},
key: selectedLink,
});
}
}

View File

@ -93,18 +93,12 @@ const PostBody = ({ body, dispatch, onLoadEnd, width }) => {
if (ind === 1) {
// open link
if (selectedLink) {
Linking.canOpenURL(selectedLink).then((supported) => {
if (supported) {
Linking.openURL(selectedLink);
} else {
dispatch(
toastNotification(
intl.formatMessage({
id: 'alert.failed_to_open',
}),
),
);
}
navigation.navigate({
name: ROUTES.SCREENS.WEB_BROWSER,
params: {
url:selectedLink,
},
key: selectedLink,
});
}
}

View File

@ -491,7 +491,7 @@
"connection_fail": "Connection Failed!",
"connection_success": "Successfully connected!",
"checking": "Checking...",
"external_link": "Open in Browser",
"external_link": "Open external link",
"not_existing_post": "The post does not exist! Please check permlink and author.",
"google_play_version": "We noticed that your device has old version of Google Play. Please update Google Play services and try again!",
"rc_down": "Not enough resource credits to perform an action! \n\nBoost your account to continue enjoy the experience. Do you want to boost your account, now?",