mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 13:53:11 +08:00
resolve harmony hot update fail issue (#483)
* fix harmony more than 2M issue * fix mtpush-react-native conflics * update harmony remote dependency flow * udpate * udpate * udpate * udpate * udpate * update * uddate * udpapte * adapter pushy for Expo * udpate * resolve harmony hot update fail issue * udpate * udpate * udpate * udpate * udpate * update * udpate
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
promiseAny,
|
||||
testUrls,
|
||||
} from './utils';
|
||||
import { EmitterSubscription, Platform } from 'react-native';
|
||||
import { EmitterSubscription, Platform, DeviceEventEmitter } from 'react-native';
|
||||
import { PermissionsAndroid } from './permissions';
|
||||
import {
|
||||
PushyModule,
|
||||
@@ -350,14 +350,25 @@ export class Pushy {
|
||||
return;
|
||||
}
|
||||
if (onDownloadProgress) {
|
||||
Pushy.progressHandlers[hash] = pushyNativeEventEmitter.addListener(
|
||||
'RCTPushyDownloadProgress',
|
||||
progressData => {
|
||||
if (progressData.hash === hash) {
|
||||
onDownloadProgress(progressData);
|
||||
}
|
||||
},
|
||||
);
|
||||
if (Platform.OS === 'harmony') {
|
||||
Pushy.progressHandlers[hash] = DeviceEventEmitter.addListener(
|
||||
'RCTPushyDownloadProgress',
|
||||
progressData => {
|
||||
if (progressData.hash === hash) {
|
||||
onDownloadProgress(progressData);
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
Pushy.progressHandlers[hash] = pushyNativeEventEmitter.addListener(
|
||||
'RCTPushyDownloadProgress',
|
||||
progressData => {
|
||||
if (progressData.hash === hash) {
|
||||
onDownloadProgress(progressData);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
let succeeded = '';
|
||||
this.report({ type: 'downloading' });
|
||||
|
||||
Reference in New Issue
Block a user