mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	update example
This commit is contained in:
		| @@ -18,7 +18,7 @@ | |||||||
|     "react-native": "0.69.8", |     "react-native": "0.69.8", | ||||||
|     "react-native-paper": "^5.12.1", |     "react-native-paper": "^5.12.1", | ||||||
|     "react-native-safe-area-context": "^4.8.2", |     "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" |     "react-native-vector-icons": "^10.0.3" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|   | |||||||
| @@ -47,7 +47,7 @@ function App() { | |||||||
|           onValueChange={v => { |           onValueChange={v => { | ||||||
|             setUseDefaultAlert(v); |             setUseDefaultAlert(v); | ||||||
|             client?.setOptions({ |             client?.setOptions({ | ||||||
|               useAlert: v, |               updateStrategy: v ? null : 'alwaysAlert', | ||||||
|             }); |             }); | ||||||
|             setShowUpdateSnackbar(!v); |             setShowUpdateSnackbar(!v); | ||||||
|           }} |           }} | ||||||
|   | |||||||
| @@ -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" |   resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.8.2.tgz#e6b3d8acf3c6afcb4b5db03a97f9c37df7668f65" | ||||||
|   integrity sha512-ffUOv8BJQ6RqO3nLml5gxJ6ab3EestPiyWekxdzO/1MQ7NF8fW1Mzh1C5QE9yq573Xefnc7FuzGXjtesZGv7cQ== |   integrity sha512-ffUOv8BJQ6RqO3nLml5gxJ6ab3EestPiyWekxdzO/1MQ7NF8fW1Mzh1C5QE9yq573Xefnc7FuzGXjtesZGv7cQ== | ||||||
|  |  | ||||||
| react-native-update@^10.5.4: | react-native-update@^10.6.0-beta.0: | ||||||
|   version "10.5.4" |   version "10.6.0-beta.0" | ||||||
|   resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.5.4.tgz#00bb26ad021bb85b12f0daa435fb118259c816e1" |   resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.6.0-beta.0.tgz#5414989a44f7bc94c97a8c29661c3fc4f43521d8" | ||||||
|   integrity sha512-6/AmsS8lOy5dJC4urWtFvhGmnqGJbabN2xnMVkZz5thLiMjcrNXipzpAN6FlHezdyPq/7wrsDCzpcgBnQKQRRg== |   integrity sha512-p/nTO/0qZhgxcmUXoiBkRvBa1yo3MocbJL4dMHboqOtK3TtUYhilP9O6fZQ9FBev4BjTyHBeXDjwT6eutw9gXg== | ||||||
|   dependencies: |   dependencies: | ||||||
|     nanoid "^3.3.3" |     nanoid "^3.3.3" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ export class Pushy { | |||||||
|     appKey: '', |     appKey: '', | ||||||
|     server: defaultServer, |     server: defaultServer, | ||||||
|     autoMarkSuccess: true, |     autoMarkSuccess: true, | ||||||
|     updateStrategy: 'alwaysAsk', |     updateStrategy: 'alwaysAlert', | ||||||
|     checkStrategy: 'both', |     checkStrategy: 'both', | ||||||
|     logger: noop, |     logger: noop, | ||||||
|     debug: false, |     debug: false, | ||||||
|   | |||||||
| @@ -47,7 +47,7 @@ export const PushyProvider = ({ | |||||||
|         Alert.alert(...args); |         Alert.alert(...args); | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     [options], |     [options.updateStrategy], | ||||||
|   ); |   ); | ||||||
|  |  | ||||||
|   const switchVersion = useCallback(() => { |   const switchVersion = useCallback(() => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm