From 127bdfbbeeea47b09e7a5f0ebd4c222cb4b0a73d Mon Sep 17 00:00:00 2001 From: Alexander Kuttig Date: Wed, 19 Apr 2017 13:05:23 +0200 Subject: [PATCH] fixed onDisconnectSet on iOS removed onDisconnectSetString renamed onDisconnectSetObject to onDisconnectSet called Firebase onDisconnectSetValue with props.value --- ios/RNFirebase/RNFirebaseDatabase.m | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/ios/RNFirebase/RNFirebaseDatabase.m b/ios/RNFirebase/RNFirebaseDatabase.m index b91465c8..4220f8b7 100644 --- a/ios/RNFirebase/RNFirebaseDatabase.m +++ b/ios/RNFirebase/RNFirebaseDatabase.m @@ -614,28 +614,17 @@ RCT_EXPORT_METHOD(off:(NSString *)path } // On disconnect -RCT_EXPORT_METHOD(onDisconnectSetObject:(NSString *) path +RCT_EXPORT_METHOD(onDisconnectSet:(NSString *) path props:(NSDictionary *) props callback:(RCTResponseSenderBlock) callback) { FIRDatabaseReference *ref = [self getPathRef:path]; - [ref onDisconnectSetValue:props + [ref onDisconnectSetValue:props[@"value"] withCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) { [self handleCallback:@"onDisconnectSetObject" callback:callback databaseError:error]; }]; } -RCT_EXPORT_METHOD(onDisconnectSetString:(NSString *) path - val:(NSString *) val - callback:(RCTResponseSenderBlock) callback) -{ - FIRDatabaseReference *ref = [self getPathRef:path]; - [ref onDisconnectSetValue:val - withCompletionBlock:^(NSError * _Nullable error, FIRDatabaseReference * _Nonnull ref) { - [self handleCallback:@"onDisconnectSetString" callback:callback databaseError:error]; - }]; -} - RCT_EXPORT_METHOD(onDisconnectRemove:(NSString *) path callback:(RCTResponseSenderBlock) callback) {