mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-12-19 12:15:08 +08:00
Fix download event and remove unzip event
This commit is contained in:
@@ -153,14 +153,6 @@ export async function downloadUpdate(options, eventListeners) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (eventListeners.onUnzipProgress) {
|
||||
const unzipCallback = eventListeners.onUnzipProgress;
|
||||
eventEmitter.addListener('RCTPushyUnzipProgress', (progressData) => {
|
||||
if (progressData.hash === options.hash) {
|
||||
unzipCallback(progressData);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (options.diffUrl) {
|
||||
logger('downloading diff');
|
||||
@@ -177,7 +169,6 @@ export async function downloadUpdate(options, eventListeners) {
|
||||
});
|
||||
}
|
||||
eventEmitter.removeAllListeners('RCTPushyDownloadProgress');
|
||||
eventEmitter.removeAllListeners('RCTPushyUnzipProgress');
|
||||
return options.hash;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user