1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-03 23:03:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

chore: lint

This commit is contained in:
sunnylqm
2024-03-07 22:11:44 +08:00
parent 22c4b01ead
commit 94cf96a0e5
13 changed files with 627 additions and 383 deletions

View File

@@ -86,9 +86,9 @@ export const PushyProvider = ({
},
},
]);
} catch (err) {
setLastError(err);
showAlert('更新失败', err.message);
} catch (e: any) {
setLastError(e);
showAlert('更新失败', e.message);
}
}, [client, showAlert, updateInfo]);
@@ -105,9 +105,9 @@ export const PushyProvider = ({
let info: CheckResult;
try {
info = await client.checkUpdate();
} catch (err) {
setLastError(err);
showAlert('更新检查失败', err.message);
} catch (e: any) {
setLastError(e);
showAlert('更新检查失败', e.message);
return;
}
setUpdateInfo(info);
@@ -159,7 +159,7 @@ export const PushyProvider = ({
if (strategy === 'both' || strategy === 'onAppResume') {
stateListener.current = AppState.addEventListener(
'change',
(nextAppState) => {
nextAppState => {
if (nextAppState === 'active') {
checkUpdate();
}
@@ -198,8 +198,7 @@ export const PushyProvider = ({
progress,
downloadAndInstallApk,
getCurrentVersionInfo,
}}
>
}}>
{children}
</PushyContext.Provider>
);