Skip to content

Commit 4d41d72

Browse files
DevmateDropRctExportMethod Botfacebook-github-bot
authored andcommitted
xplat/js/react-native-github/packages/react-native/Libraries/Settings/RCTSettingsManager.mm
Summary: ...found). Changelog: [Internal] _____ * Do **NOT** post in the CodemodService Feedback group about this specific diff. * If you have feedback, comment on the diff and use an appropriate diff action. This [diff was created](https://www.internalfb.com/intern/sandcastle/job/18014401344983091/) with [CodemodService](https://www.internalfb.com/codemod_service/CodemodConfigDevmateDropRctExportMethod). Reviewed By: cortinico Differential Revision: D114843845
1 parent d89c432 commit 4d41d72

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/react-native/Libraries/Settings/RCTSettingsManager.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ - (void)userDefaultsDidChange:(NSNotification *)note
7979
* Set one or more values in the settings.
8080
* TODO: would it be useful to have a callback for when this has completed?
8181
*/
82-
RCT_EXPORT_METHOD(setValues : (NSDictionary *)values)
82+
- (void)setValues:(NSDictionary *)values
8383
{
8484
_ignoringUpdates = YES;
8585
[values enumerateKeysAndObjectsUsingBlock:^(NSString *key, id json, BOOL *stop) {
@@ -98,8 +98,9 @@ - (void)userDefaultsDidChange:(NSNotification *)note
9898
/**
9999
* Remove some values from the settings.
100100
*/
101-
RCT_EXPORT_METHOD(deleteValues : (NSArray<NSString *> *)keys)
101+
- (void)deleteValues:(NSArray *)keysRaw
102102
{
103+
NSArray<NSString *> *keys = [RCTConvert NSStringArray:keysRaw];
103104
_ignoringUpdates = YES;
104105
for (NSString *key in keys) {
105106
[_defaults removeObjectForKey:key];

0 commit comments

Comments
 (0)