mirror of https://github.com/tooot-app/app
Fix 669
This commit is contained in:
parent
5cd83ae055
commit
613cf1365c
|
@ -73,18 +73,19 @@ const openLink = async (url: string, navigation?: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Some links might end with an empty space at the end that triggers an error
|
||||||
switch (getGlobalStorage.string('app.browser')) {
|
switch (getGlobalStorage.string('app.browser')) {
|
||||||
// Some links might end with an empty space at the end that triggers an error
|
case 'external':
|
||||||
|
await Linking.openURL(url.trim())
|
||||||
|
break
|
||||||
case 'internal':
|
case 'internal':
|
||||||
|
default:
|
||||||
await WebBrowser.openBrowserAsync(url.trim(), {
|
await WebBrowser.openBrowserAsync(url.trim(), {
|
||||||
dismissButtonStyle: 'close',
|
dismissButtonStyle: 'close',
|
||||||
enableBarCollapsing: true,
|
enableBarCollapsing: true,
|
||||||
...(await browserPackage())
|
...(await browserPackage())
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'external':
|
|
||||||
await Linking.openURL(url.trim())
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue