1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
xmflsct
2023-01-22 18:17:57 +01:00
parent 5cd83ae055
commit 613cf1365c

View File

@@ -73,18 +73,19 @@ const openLink = async (url: string, navigation?: any) => {
}
}
switch (getGlobalStorage.string('app.browser')) {
// Some links might end with an empty space at the end that triggers an error
switch (getGlobalStorage.string('app.browser')) {
case 'external':
await Linking.openURL(url.trim())
break
case 'internal':
default:
await WebBrowser.openBrowserAsync(url.trim(), {
dismissButtonStyle: 'close',
enableBarCollapsing: true,
...(await browserPackage())
})
break
case 'external':
await Linking.openURL(url.trim())
break
}
}