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

v10.0.0-beta.1

This commit is contained in:
sunnylqm
2024-01-22 15:34:54 +08:00
parent 40b2e9dea0
commit e86df57476
4 changed files with 838 additions and 1549 deletions

View File

@@ -12,19 +12,23 @@ export const defaultContext = {
markSuccess: noop,
dismissError: noop,
downloadUpdate: noop,
currentHash: '',
packageVersion: '',
};
export const PushyContext = createContext<{
checkUpdate: () => void;
switchVersion: () => void;
switchVersionLater: () => void;
progress?: ProgressData;
markSuccess: () => void;
dismissError: () => void;
downloadUpdate: () => void;
currentHash: string;
packageVersion: string;
client?: Pushy;
progress?: ProgressData;
updateInfo?: CheckResult;
lastError?: Error;
dismissError: () => void;
client?: Pushy;
downloadUpdate: () => void;
}>(defaultContext);
export const usePushy = () => useContext(PushyContext);