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) { if (ind === 1) {
// open link // open link
if (selectedLink) { if (selectedLink) {
Linking.canOpenURL(selectedLink).then((supported) => { RootNavigation.navigate({
if (supported) { name: ROUTES.SCREENS.WEB_BROWSER,
Linking.openURL(selectedLink); params: {
} else { url:selectedLink,
dispatch( },
toastNotification( key: selectedLink,
intl.formatMessage({
id: 'alert.failed_to_open',
}),
),
);
}
}); });
} }
} }

View File

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

View File

@ -491,7 +491,7 @@
"connection_fail": "Connection Failed!", "connection_fail": "Connection Failed!",
"connection_success": "Successfully connected!", "connection_success": "Successfully connected!",
"checking": "Checking...", "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.", "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!", "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?", "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?",