mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	Fix event warning
This commit is contained in:
		| @@ -279,8 +279,17 @@ public class UpdateModule extends ReactContextBaseJavaModule { | |||||||
|     public void getLocalHashInfo(final String hash, final Promise promise) { |     public void getLocalHashInfo(final String hash, final Promise promise) { | ||||||
|         promise.resolve(updateContext.getKv("hash_" + hash)); |         promise.resolve(updateContext.getKv("hash_" + hash)); | ||||||
|     } |     } | ||||||
|      |  | ||||||
|  |  | ||||||
|  |     @ReactMethod | ||||||
|  |     public void addListener(String eventName) { | ||||||
|  |     // Set up any upstream listeners or background tasks as necessary | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @ReactMethod | ||||||
|  |     public void removeListeners(Integer count) { | ||||||
|  |     // Remove upstream listeners, stop unnecessary background tasks | ||||||
|  |     } | ||||||
|  |      | ||||||
|     /* 发送事件*/ |     /* 发送事件*/ | ||||||
|     public static void sendEvent(String eventName, WritableMap params) { |     public static void sendEvent(String eventName, WritableMap params) { | ||||||
|         ((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName, |         ((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm