Skip to content

Commit

Permalink
Fix Android NativeEventEmitter warnings
Browse files Browse the repository at this point in the history
Adds method stubs required by React Native 0.65+, to address warnings that "new NativeEventEmitter was called with a non-null argument without the required [addListener/removeListeners] method"
  • Loading branch information
TheAlmightyBob authored and plrthink committed Apr 10, 2022
1 parent d73894e commit 7c41a73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions android/src/main/java/com/rnziparchive/RNZipArchiveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,4 +510,14 @@ private String getStackTrace(Exception e) {
return sw.toString();
}

@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
}

@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}

}

0 comments on commit 7c41a73

Please sign in to comment.