Skip to content

Commit e036b4b

Browse files
author
João Parreira
committed
Merge pull request #2 from JoaoCaixinha/master
onReconnect and onReconnecting event name fix on native
2 parents 22bb2cf + e292a2d commit e036b4b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

RCTRealtimeCloudStorageAndroid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class RCTRealtimeCloudStorageAndroid extends React.Component {
9797

9898
onReconnected(callback: Function){
9999
storage.onReconnect(this.sId);
100-
RCTRealtimeCloudStorageAndroid.RTEventListener(this.sId + "-onReconnected", callback);
100+
RCTRealtimeCloudStorageAndroid.RTEventListener(this.sId + "-onReconnect", callback);
101101
}
102102

103103
onReconnecting(callback: Function){

reactnativestorageandroid/src/main/java/co/realtime/reactnativestorageandroid/RealtimeStorageAndroid.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public void onReconnect(final Integer sId){
289289
storageRef.onReconnected(new OnReconnected() {
290290
@Override
291291
public void run(StorageRef storageRef) {
292-
sendEvent(getReactApplicationContext(), sId + "-onReconnected", null);
292+
sendEvent(getReactApplicationContext(), sId + "-onReconnect", null);
293293
}
294294
});
295295
}
@@ -303,7 +303,7 @@ public void onReconnecting(final Integer sId){
303303
storageRef.onReconnecting(new OnReconnecting() {
304304
@Override
305305
public void run(StorageRef storageRef) {
306-
sendEvent(getReactApplicationContext(), sId + "-onReconnected", null);
306+
sendEvent(getReactApplicationContext(), sId + "-onReconnecting", null);
307307
}
308308
});
309309
}

0 commit comments

Comments
 (0)