Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
ikun0014 2024-10-15 19:07:57 +08:00
commit e43f953992
No known key found for this signature in database
GPG Key ID: CB646D33779F3C89
5 changed files with 22 additions and 18578 deletions

View File

@ -8,6 +8,9 @@ module.exports = {
'react-native',
'react-native-pager-view',
'react-native-navigation',
'@react-native/metro-config',
'@react-native/babel-preset',
'@react-native/typescript-config',
],
// target: 'patch',
@ -16,5 +19,7 @@ module.exports = {
// 'react',
// 'react-native',
// '@react-native/metro-config',
// '@react-native/babel-preset',
// '@react-native/typescript-config',
// ],
}

18565
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -46,8 +46,8 @@
"dependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",
"@react-native-async-storage/async-storage": "^2.0.0",
"@react-native-clipboard/clipboard": "^1.14.1",
"@react-native-community/slider": "^4.5.2",
"@react-native-clipboard/clipboard": "^1.14.2",
"@react-native-community/slider": "^4.5.3",
"iconv-lite": "^0.6.3",
"lrc-file-parser": "^2.4.1",
"message2call": "^0.1.3",
@ -64,21 +64,21 @@
"react-native-pager-view": "6.3.0",
"react-native-quick-base64": "^2.1.2",
"react-native-quick-md5": "^3.0.6",
"react-native-track-player": "github:lyswhut/react-native-track-player#a567c8b0a319e41430afdb782526723243ea3950",
"react-native-vector-icons": "^10.1.0",
"rn-fetch-blob": "^0.12.0"
"rn-fetch-blob": "^0.12.0",
"react-native-track-player": "github:lyswhut/react-native-track-player#409bfef00c16eb08f2aea35dfaf0b2fc40be0434",
"react-native-vector-icons": "^10.2.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/preset-env": "^7.25.4",
"@babel/runtime": "^7.25.4",
"@react-native/babel-preset": "^0.74.86",
"@babel/runtime": "^7.25.6",
"@react-native/babel-preset": "^0.74.87",
"@react-native/metro-config": "^0.74.87",
"@react-native/typescript-config": "^0.74.86",
"@react-native/typescript-config": "^0.74.87",
"@tsconfig/react-native": "^3.0.5",
"@types/react": "^18.3.4",
"@types/react": "^18.3.8",
"@types/react-native": "^0.72.8",
"@types/react-native-background-timer": "^2.0.2",
"@types/react-native-vector-icons": "^6.4.18",
@ -86,8 +86,8 @@
"changelog-parser": "^3.0.1",
"eslint-config-standard": "^17.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
}
}

View File

@ -1,4 +1,4 @@
### 优化
- 首次使用的提示窗口可以点击背景或者返回键关闭(#577
- 上移 Toast 位置避免遮挡播放模式图标(#603 @sibojia

View File

@ -117,19 +117,23 @@ export const toast = (message: string, duration: 'long' | 'short' = 'short', pos
break
}
let _position
let offset: number
switch (position) {
case 'top':
_position = ToastAndroid.TOP
offset = 120
break
case 'center':
_position = ToastAndroid.CENTER
offset = 0
break
case 'bottom':
default:
_position = ToastAndroid.BOTTOM
offset = 120
break
}
ToastAndroid.showWithGravity(message, _duration, _position)
ToastAndroid.showWithGravityAndOffset(message, _duration, _position, 0, offset)
}
export const openUrl = async(url: string): Promise<void> => Linking.canOpenURL(url).then(async() => Linking.openURL(url))