add info param to switchversion
This commit is contained in:
parent
7780f9985e
commit
13d8cf7b80
@ -62,17 +62,23 @@ export const PushyProvider = ({
|
|||||||
[options.updateStrategy],
|
[options.updateStrategy],
|
||||||
);
|
);
|
||||||
|
|
||||||
const switchVersion = useCallback(() => {
|
const switchVersion = useCallback(
|
||||||
if (updateInfo && updateInfo.hash) {
|
(info: CheckResult | undefined = updateInfoRef.current) => {
|
||||||
client.switchVersion(updateInfo.hash);
|
if (info && info.hash) {
|
||||||
}
|
client.switchVersion(info.hash);
|
||||||
}, [client, updateInfo]);
|
}
|
||||||
|
},
|
||||||
|
[client],
|
||||||
|
);
|
||||||
|
|
||||||
const switchVersionLater = useCallback(() => {
|
const switchVersionLater = useCallback(
|
||||||
if (updateInfo && updateInfo.hash) {
|
(info: CheckResult | undefined = updateInfoRef.current) => {
|
||||||
client.switchVersionLater(updateInfo.hash);
|
if (info && info.hash) {
|
||||||
}
|
client.switchVersionLater(info.hash);
|
||||||
}, [client, updateInfo]);
|
}
|
||||||
|
},
|
||||||
|
[client],
|
||||||
|
);
|
||||||
|
|
||||||
const downloadUpdate = useCallback(
|
const downloadUpdate = useCallback(
|
||||||
async (info: CheckResult | undefined = updateInfoRef.current) => {
|
async (info: CheckResult | undefined = updateInfoRef.current) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user