Fix some weird link

This commit is contained in:
Zhiyuan Zheng 2021-08-11 00:04:12 +02:00
parent 6488a8f7bd
commit d2bf27a85a
1 changed files with 3 additions and 2 deletions

View File

@ -123,14 +123,15 @@ const openLink = async (
loadingLink = false
switch (getSettingsBrowser(store.getState())) {
// Some links might end with an empty space at the end that triggers an error
case 'internal':
await WebBrowser.openBrowserAsync(url, {
await WebBrowser.openBrowserAsync(encodeURI(url), {
dismissButtonStyle: 'close',
enableBarCollapsing: true
})
break
case 'external':
await Linking.openURL(url)
await Linking.openURL(encodeURI(url))
break
}
}