1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

update example

This commit is contained in:
sunnylqm 2024-06-11 10:59:27 +08:00
parent e63fa0fdb6
commit 9af0538a2a
No known key found for this signature in database
5 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@
"react-native": "0.69.8",
"react-native-paper": "^5.12.1",
"react-native-safe-area-context": "^4.8.2",
"react-native-update": "^10.5.4",
"react-native-update": "^10.6.0-beta.0",
"react-native-vector-icons": "^10.0.3"
},
"devDependencies": {

View File

@ -47,7 +47,7 @@ function App() {
onValueChange={v => {
setUseDefaultAlert(v);
client?.setOptions({
useAlert: v,
updateStrategy: v ? null : 'alwaysAlert',
});
setShowUpdateSnackbar(!v);
}}

View File

@ -6231,10 +6231,10 @@ react-native-safe-area-context@^4.8.2:
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.8.2.tgz#e6b3d8acf3c6afcb4b5db03a97f9c37df7668f65"
integrity sha512-ffUOv8BJQ6RqO3nLml5gxJ6ab3EestPiyWekxdzO/1MQ7NF8fW1Mzh1C5QE9yq573Xefnc7FuzGXjtesZGv7cQ==
react-native-update@^10.5.4:
version "10.5.4"
resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.5.4.tgz#00bb26ad021bb85b12f0daa435fb118259c816e1"
integrity sha512-6/AmsS8lOy5dJC4urWtFvhGmnqGJbabN2xnMVkZz5thLiMjcrNXipzpAN6FlHezdyPq/7wrsDCzpcgBnQKQRRg==
react-native-update@^10.6.0-beta.0:
version "10.6.0-beta.0"
resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.6.0-beta.0.tgz#5414989a44f7bc94c97a8c29661c3fc4f43521d8"
integrity sha512-p/nTO/0qZhgxcmUXoiBkRvBa1yo3MocbJL4dMHboqOtK3TtUYhilP9O6fZQ9FBev4BjTyHBeXDjwT6eutw9gXg==
dependencies:
nanoid "^3.3.3"

View File

@ -33,7 +33,7 @@ export class Pushy {
appKey: '',
server: defaultServer,
autoMarkSuccess: true,
updateStrategy: 'alwaysAsk',
updateStrategy: 'alwaysAlert',
checkStrategy: 'both',
logger: noop,
debug: false,

View File

@ -47,7 +47,7 @@ export const PushyProvider = ({
Alert.alert(...args);
}
},
[options],
[options.updateStrategy],
);
const switchVersion = useCallback(() => {