mirror of
https://github.com/tooot-app/app
synced 2024-12-21 23:24:29 +01:00
Fix #593
This commit is contained in:
parent
2ac1d49f9f
commit
54c99eb054
@ -1,5 +1 @@
|
||||
Enjoy toooting! This version includes following improvements and fixes:
|
||||
- Align filter experience with v4.0 and above
|
||||
- Supports enlarging user's avatar and banner
|
||||
- Fix iPad weird sizing (not optimisation)
|
||||
- Experiment (!) support of Pleroma
|
||||
|
@ -1,5 +1 @@
|
||||
toooting愉快!此版本包括以下改进和修复:
|
||||
- 改进过滤体验,与v4.0以上版本一致
|
||||
- 支持查看用户的头像和横幅图片
|
||||
- 修复iPad部分尺寸问题(非优化)
|
||||
- 试验性(!)支持Pleroma
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tooot",
|
||||
"version": "4.7.1",
|
||||
"version": "4.7.2",
|
||||
"description": "tooot for Mastodon",
|
||||
"author": "xmflsct <me@xmflsct.com>",
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
@ -7,6 +7,7 @@ import { SearchResult } from '@utils/queryHooks/search'
|
||||
import { getSettingsBrowser } from '@utils/slices/settingsSlice'
|
||||
import * as Linking from 'expo-linking'
|
||||
import * as WebBrowser from 'expo-web-browser'
|
||||
import validUrl from 'valid-url'
|
||||
|
||||
export let loadingLink = false
|
||||
|
||||
@ -86,19 +87,22 @@ const openLink = async (url: string, navigation?: any) => {
|
||||
}
|
||||
|
||||
loadingLink = false
|
||||
const validatedUrl = validUrl.isWebUri(url)
|
||||
if (validatedUrl) {
|
||||
switch (getSettingsBrowser(store.getState())) {
|
||||
// Some links might end with an empty space at the end that triggers an error
|
||||
case 'internal':
|
||||
await WebBrowser.openBrowserAsync(encodeURI(url), {
|
||||
await WebBrowser.openBrowserAsync(validatedUrl, {
|
||||
dismissButtonStyle: 'close',
|
||||
enableBarCollapsing: true,
|
||||
...(await browserPackage())
|
||||
})
|
||||
break
|
||||
case 'external':
|
||||
await Linking.openURL(encodeURI(url))
|
||||
await Linking.openURL(validatedUrl)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default openLink
|
||||
|
Loading…
Reference in New Issue
Block a user